Module: Sufia::WorksControllerBehavior
- Extended by:
- ActiveSupport::Concern
- Includes:
- CurationConcerns::CurationConcernController, Breadcrumbs
- Defined in:
- app/controllers/concerns/sufia/works_controller_behavior.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Methods included from Breadcrumbs
#build_breadcrumbs, #default_trail, #trail_from_referer
Instance Method Details
#new ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/concerns/sufia/works_controller_behavior.rb', line 21 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 = Sufia::AdminSetService.new(self).search_results(:deposit).first curation_concern.admin_set_id = admin_set && admin_set.id super end |