Module: CurationConcerns::UploadSetsControllerBehavior

Extended by:
ActiveSupport::Concern
Includes:
Hydra::Controller::ControllerBehavior
Included in:
UploadSetsController
Defined in:
app/controllers/concerns/curation_concerns/upload_sets_controller_behavior.rb

Instance Method Summary collapse

Instance Method Details

#editObject



14
15
16
17
18
# File 'app/controllers/concerns/curation_concerns/upload_sets_controller_behavior.rb', line 14

def edit
  # TODO: redlock this line so that two processes don't attempt to create at the same time.
  @upload_set = UploadSet.find_or_create(params[:id])
  @form = edit_form
end

#updateObject



20
21
22
23
24
25
26
27
28
29
# File 'app/controllers/concerns/curation_concerns/upload_sets_controller_behavior.rb', line 20

def update
  authenticate_user!
  @upload_set = UploadSet.find(params[:id])
  @upload_set.status = ["processing"]
  @upload_set.save
  create_update_job
  flash[:notice] = 'Your files are being processed by ' + t('curation_concerns.product_name') + ' in the background. The metadata and access controls you specified are being applied. Files will be marked <span class="label label-danger" title="Private">Private</span> until this process is complete (shouldn\'t take too long, hang in there!). You may need to refresh your dashboard to see these updates.'

  redirect_after_update
end