Module: Hyrax::WorksControllerBehavior
- Extended by:
- ActiveSupport::Concern
- Includes:
- CurationConcernController
- Defined in:
- app/controllers/concerns/hyrax/works_controller_behavior.rb
Instance Method Summary collapse
Methods included from CurationConcernController
#create, #destroy, #edit, #file_manager, #inspect_work, #show, #update
Instance Method Details
#new ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/concerns/hyrax/works_controller_behavior.rb', line 7 def new # TODO: move these lines to the work form builder in Hyrax curation_concern.depositor = current_user.user_key # admin_set_id is required on the client, otherwise simple_form renders a blank option. # however it isn't a required field for someone to submit via json. # Set the first admin_set they have access to. admin_set = Hyrax::AdminSetService.new(self).search_results(:deposit).first curation_concern.admin_set_id = admin_set && admin_set.id super end |