Displaying 2 results from an estimated 2 matches for "intended_id".
Did you mean:
extended_id
2006 Aug 01
0
How to retrieve :web when redirecting to an Instiki page?
...h looks like
this:
def signin
ession[:user] = User.authenticate(params[:username],
params[:password]).id
redirect_to :web=> session[:intended_web],
:controller => session[:intended_controller],
:action => session[:intended_action],
:id => session[:intended_id]
end
I realize that session[:intended_web] is a naive attempt and returns nil
since that session variable doesn''t exist, so how should I go about
retrieving the intended web''s name upon signin redirection?
(Of course if there is a single web and I set DEFAULT_WEB to the web...
2006 Jul 02
3
2 before_filters, only want one to render something
...go through and pick only one method
to be before_filtered for each action?
def authorize #inspired by rails recipes
unless session[:user]
flash[:notice] = "Please log in"
session[:intended_action] = action_name
session[:intended_controller] = controller_name
session[:intended_id] = params[:id] || nil
redirect_to(:controller => "account", :action => "login")
return
end
end
def admin_authorize
unless session[:user] && User.find(session[:user]).admin?
redirect_to :controller=> "groups", :action => "index&...