How to activate redirection with Authorization Plugin

I could not find any example of how to use the method :store_location
to activate the redirect feature of the authorization plugin. I am
using restful_authentication plugin and the authorization plugin . any
help will be greatly appreciated !

Guy

Mcgill Guy wrote:

I could not find any example of how to use the method :store_location
to activate the redirect feature of the authorization plugin. I am
using restful_authentication plugin and the authorization plugin . any
help will be greatly appreciated !

Guy

What do you want to know? The method store_location is generated in
lib/authenticated_system to be:

# Store the URI of the current request in the session.
#
# We can return to this location by calling 

#redirect_back_or_default.
def store_location
session[:return_to] = request.request_uri
end

if, you need to store an alternate url that is not located in the
request just rewrite the method to be

def store_location(url = request.request_uri)
  session[:return_to] = url
end

hth

ilan

that’s true,
but the problem is that this setting is not redirecting back when
there not enough permissions, i.e only redirect to homepage gets
executed.
I would like to be able to redirect users back to the page they came
from.
any idea why this is the case?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs