I have a controller file "maybies_controller.rb" class MaybiesController < ApplicationController def login redirect_to "/maybies/categories" end def categories @category = Category.find(:all) end end routes.rb file map.connect ''/maybies/:login'', :controller => ''maybies'', :action => ''login'' map.connect ''/maybies/:categories'', :controller => ''maybies'', :action => ''categories'' The page is not re directing to categories page. It is getting stucked in infinite loop in login page. pls help to resolve -- Posted via http://www.ruby-forum.com/.
Do you happen to have a filter that is directing all your users (who are not logged in) to the login page. That way they are going /maybies/categories => /login => /maybies/categories => /login ... etc.. Hope that helps, Jim http://www.thepeoplesfeed.com/contribute On Tue, Sep 1, 2009 at 8:01 AM, Vijay Ks <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>wrote:> > I have a controller file "maybies_controller.rb" > > class MaybiesController < ApplicationController > def login > redirect_to "/maybies/categories" > end > > def categories > @category = Category.find(:all) > end > end > > routes.rb file > map.connect ''/maybies/:login'', :controller => ''maybies'', :action => > ''login'' > > map.connect ''/maybies/:categories'', :controller => ''maybies'', :action => > ''categories'' > > > The page is not re directing to categories page. It is getting stucked > in infinite loop in login page. pls help to resolve > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
James Englert wrote:> Do you happen to have a filter that is directing all your users (who are > not > logged in) to the login page. That way they are going > > /maybies/categories => /login => /maybies/categories => /login ... etc.. > > > Hope that helps, > Jim > http://www.thepeoplesfeed.com/contribute > > On Tue, Sep 1, 2009 at 8:01 AM, Vijay Kscan you give me the right code for this issue -- Posted via http://www.ruby-forum.com/.
Check if your controller classes and your application_controller.rb for any before_filters. Sometime authentication gems come with this type of functionality. Are you using any? On Tue, Sep 1, 2009 at 8:35 AM, Vijay Ks <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>wrote:> > James Englert wrote: > > Do you happen to have a filter that is directing all your users (who are > > not > > logged in) to the login page. That way they are going > > > > /maybies/categories => /login => /maybies/categories => /login ... etc.. > > > > > > Hope that helps, > > Jim > > http://www.thepeoplesfeed.com/contribute > > > > On Tue, Sep 1, 2009 at 8:01 AM, Vijay Ks > > can you give me the right code for this issue > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
James is right, I guess your categories page requires user''s to be logged in (ie, you have some before_filter in your controller), and in the login action you are not properly setting appropriate login parameters (which means user is not getting signed in through login action) You will have to check your login action. -- Abhinav http://twitter.com/abhinav On Tue, Sep 1, 2009 at 6:44 PM, James Englert <englert.james-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Check if your controller classes and your application_controller.rb for any > before_filters. Sometime authentication gems come with this type of > functionality. Are you using any? > > > On Tue, Sep 1, 2009 at 8:35 AM, Vijay Ks <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org > > wrote: > >> >> James Englert wrote: >> > Do you happen to have a filter that is directing all your users (who are >> > not >> > logged in) to the login page. That way they are going >> > >> > /maybies/categories => /login => /maybies/categories => /login ... etc.. >> > >> > >> > Hope that helps, >> > Jim >> > http://www.thepeoplesfeed.com/contribute >> > >> > On Tue, Sep 1, 2009 at 8:01 AM, Vijay Ks >> >> can you give me the right code for this issue >> -- >> Posted via http://www.ruby-forum.com/. >> >> >> > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---