Module: Neuron::Authorization::Controller

Extended by:
ActiveSupport::Concern
Defined in:
lib/neuron/authorization.rb

Defined Under Namespace

Modules: ClassMethods, ControllerExtension

Instance Method Summary collapse

Instance Method Details

#access_denied(exception = nil) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/neuron/authorization.rb', line 27

def access_denied(exception = nil)
  if user_signed_in?
    redirect_to '/422.html'
  else
    redirect_to new_user_session_path, alert: I18n.t('devise.failure.unauthenticated')
  end
end