I have need to display two distinguishing types of information on the login.rhtml view, one for a hunter and the other for a recruiter. The are both based on the same user model that acts as authenticated has created. Each of the methods hunter/index and recruiter/index redirect me to account/login when I need to login to the system. I need a way to find out from what the controller was before it hit the account/login redirect, either it was recruiter or hunter. Is there a way of doing getting the name of the controller before that redirect and accessing it from the account/login view? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Look at it as there are two partial views to be rendered with the login screen. Either hunter or recruiter partial depending on which link was clicked before the redirect to /account/login. I need a way of finding out that controller name.... On May 18, 4:12 am, Valehru <clarke.jonat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have need to display two distinguishing types of information on the > login.rhtml view, one for a hunter and the other for a recruiter. The > are both based on the same user model that acts as authenticated has > created. > > Each of the methods hunter/index and recruiter/index redirect me to > account/login when I need to login to the system. I need a way to > find out from what the controller was before it hit the account/login > redirect, either it was recruiter or hunter. > > Is there a way of doing getting the name of the controller before that > redirect and accessing it from the account/login view?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On May 17, 4:12 pm, Valehru <clarke.jonat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have need to display two distinguishing types of information on the > login.rhtml view, one for a hunter and the other for a recruiter. The > are both based on the same user model that acts as authenticated has > created. > > Each of the methods hunter/index and recruiter/index redirect me to > account/login when I need to login to the system. I need a way to > find out from what the controller was before it hit the account/login > redirect, either it was recruiter or hunter.The session contains the originating request URL in session[:return_to]. It''s messy, but you could parse the route and figure out the component from there. Or you could change lib/authenticated_system.rb to provide a more elegant workflow for click-thru tracking. -angel> > Is there a way of doing getting the name of the controller before that > redirect and accessing it from the account/login view?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
rein.henrichs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-18 18:35 UTC
Re: Acts as Authenticated Multiple login screens
Or you could simply create two login actions and link to whichever one is appropriate On May 17, 3:50 pm, Angel <delag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On May 17, 4:12 pm, Valehru <clarke.jonat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I have need to display two distinguishing types of information on the > > login.rhtml view, one for a hunter and the other for a recruiter. The > > are both based on the same user model that acts as authenticated has > > created. > > > Each of the methods hunter/index and recruiter/index redirect me to > > account/login when I need to login to the system. I need a way to > > find out from what the controller was before it hit the account/login > > redirect, either it was recruiter or hunter. > > The session contains the originating request URL in > session[:return_to]. It''s messy, but you could parse the > route and figure out the component from there. > > Or you could change lib/authenticated_system.rb to provide a more > elegant workflow for click-thru tracking. > -angel > > > > > Is there a way of doing getting the name of the controller before that > > redirect and accessing it from the account/login view?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---