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

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.message
  else
    session['user_return_to'.freeze] = request.url
    redirect_to new_user_session_path, alert: exception.message
  end
end

#find_workObject



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