Module: Sufia::SingularSubresourceController
- Extended by:
- ActiveSupport::Concern
- Included in:
- CitationsController, StatsController
- Defined in:
- app/controllers/concerns/sufia/singular_subresource_controller.rb
Instance Method Summary collapse
-
#deny_access(exception) ⇒ Object
Overriding the default behavior from Hydra::Core::ControllerBehavior.
- #find_work ⇒ Object
Instance Method Details
#deny_access(exception) ⇒ Object
Overriding the default behavior from Hydra::Core::ControllerBehavior
11 12 13 14 15 16 17 18 |
# File 'app/controllers/concerns/sufia/singular_subresource_controller.rb', line 11 def deny_access(exception) if current_user && current_user.persisted? redirect_to root_path, alert: exception. else session['user_return_to'.freeze] = request.url redirect_to new_user_session_path, alert: exception. end end |
#find_work ⇒ Object
20 21 22 |
# File 'app/controllers/concerns/sufia/singular_subresource_controller.rb', line 20 def find_work @work = CurationConcerns::WorkRelation.new.find(params[:id]) end |