cubiqsys-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Dec-10 14:48 UTC
How to redirect out from a render partial-action?
Hi!
I have a "are you logged in"-check in my application.rb that looks
like
this:
before_filter :is_logged_in
def is_logged_in()
if(!session[:userID) then
reset_session
redirect_to :controller => "login"
end
end
This works great most of the time. The problem is when the redirect_to
triggers when a user has been clicking on an action that renders a
partials into a div. Then the login-page shows up inside of that div :(
Is there a way to "break out" from that div so that the redirect
always
goes to an own page? Sort of like target="_top" in html :D
Anyone?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---