Class: Course::DuplicationsController

Inherits:
ComponentController show all
Defined in:
app/controllers/course/duplications_controller.rb

Instance Method Summary collapse

Methods included from ApplicationSignInCallbacksConcern

#sign_in

Methods included from ApplicationPaginationConcern

#page_param

Methods included from ApplicationAnnouncementsConcern

#global_announcements, #unread_global_announcements

Methods included from ApplicationInstanceUserConcern

#current_instance_user

Methods included from ApplicationUserTimeZoneConcern

#set_time_zone

Methods included from ApplicationUserConcern

#handle_access_denied, #publicly_accessible?

Methods included from ApplicationComponentsConcern

#handle_component_not_found

Instance Method Details

#authorize_duplicationObject (protected)


19
20
21
# File 'app/controllers/course/duplications_controller.rb', line 19

def authorize_duplication
  authorize!(:duplicate_from, current_course)
end

#createObject


7
8
9
10
11
12
13
14
15
# File 'app/controllers/course/duplications_controller.rb', line 7

def create
  # When selectable duplication is implemented, pass in additional arrays for all_objects
  # and selected_objects
  job = Course::DuplicationJob.perform_later(current_course, duplication_job_options).job
  respond_to do |format|
    format.html { redirect_to(job_path(job)) }
    format.json { render json: { redirect_url: job_path(job) } }
  end
end

#showObject


5
# File 'app/controllers/course/duplications_controller.rb', line 5

def show; end