Class ApplicationController
In: app/controllers/application.rb
Parent: ActionController::Base

Methods

Included Modules

AuthenticatedSystem

Public Instance methods

If a user tries to access an action they are not allowed to view, this action is called.

[Source]

    # File app/controllers/application.rb, line 17
17:   def permission_denied
18:     flash[:notice] = "You don't have privileges to access this action" 
19:     return redirect_back_or_default
20:   end

Protected Instance methods

Redirect helper. If there is no referer, will redirect to supplied default page.

[Source]

    # File app/controllers/application.rb, line 25
25:   def redirect_back_or_default(default = {:controller => 'calendar', :action => 'week'})
26:     unless request.env['HTTP_REFERER']
27:       redirect_to default
28:     else
29:       redirect_to_url request.env['HTTP_REFERER']
30:     end
31:   end

[Validate]