vendor/plugins/acts_as_authenticated/generators/authenticated/templates/authenticated_system.rb
# Redirect as appropriate when an access request fails.
#
# The default action is to redirect to the login screen.
#
# Override this method in your controllers if you want to have special
# behavior in case the <%= file_name %> is not authorized
# to access the requested action.  For example, a popup window might
# simply close itself.
Redirect as appropriate when an access request fails.
The default action is to redirect to the login screen.

Override this method in your controllers if you want to have special
behavior in case the <%= file_name %> is not authorized
to access the requested action.  For example, a popup window might
simply close itself.
Redirect as appropriate when an access request fails . The default action is to redirect to the login screen . Override this method in your controllers if you want to have special behavior in case the <% = file_name % > is not authorized to access the requested action . For example a popup window might simply close itself .
def access_denied
      respond_to do |accepts|
        accepts.html do
          store_location
          redirect_to :controller => '/<%= controller_file_name %>', :action => 'login'
        end
        accepts.xml do
          headers["Status"]           = "Unauthorized"
          headers["WWW-Authenticate"] = %(Basic realm="Web Password")
          render :text => "Could't authenticate you", :status => '401 Unauthorized'
        end
      end
      false
    end
def access_denied respond_to do | accepts | accepts . html do store_location redirect_to :controller => '/<%= controller_file_name %>' , :action => 'login' end accepts . xml do headers [ "Status" ] = "Unauthorized" headers [ "WWW-Authenticate" ] = %(Basic realm="Web Password") render :text => "Could't authenticate you" , :status => '401 Unauthorized' end end false end
Redirect as appropriate when an access request fails.
Redirect as appropriate when an access request fails .