Class: AuthenticationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/authentication_controller.rb

Instance Method Summary collapse

Instance Method Details

#not_authenticatedObject



17
18
19
# File 'app/controllers/authentication_controller.rb', line 17

def not_authenticated
  redirect_to , :error => "First log in to view this page."
end

#permission_deniedObject



8
9
10
11
12
13
14
15
# File 'app/controllers/authentication_controller.rb', line 8

def permission_denied
  flash[:error] = "Sorry, either you need to log in first to view that page."
  if current_user
    redirect_to dust_dashboard_url
  else
    redirect_to root_url
  end
end

#try_return_to_previous_page(url) ⇒ Object



21
22
23
# File 'app/controllers/authentication_controller.rb', line 21

def try_return_to_previous_page(url)
  !params[:return].blank? ? redirect_to(params[:return]) : redirect_to(url)
end