I realize this is like a super stupid question, but I''m new and would really appreciate an answer to this question. I''m setting up an authentication system, and once people sign up, it redirects them to a welcome action like this: (users_controller.rb) redirect_to :action => "welcome" I''d prefer it if they were redirected to a list of recipes (I''m making a little recipe site). What would I replace "welcome" with to get that to work? Recipes.list or something like that? I''ve tried a few things, to no avail. Thanks! -- 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 -~----------~----~----~----~------~----~------~--~---
Mark Van Holstyn
2006-Nov-05 02:09 UTC
Re: Referencing another controller in a controller?
This should do it: redirect_to :controller => ''recipies'', :action => ''list'' Remember that redirect_to can take anything that the url_for method can (check that documentation). Mark On 11/4/06, Dave A. <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I realize this is like a super stupid question, but I''m new and would > really appreciate an answer to this question. > > I''m setting up an authentication system, and once people sign up, it > redirects them to a welcome action like this: (users_controller.rb) > > redirect_to :action => "welcome" > > I''d prefer it if they were redirected to a list of recipes (I''m making a > little recipe site). What would I replace "welcome" with to get that to > work? Recipes.list or something like that? I''ve tried a few things, to > no avail. > > Thanks! > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Mark Van Holstyn mvanholstyn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://lotswholetime.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 -~----------~----~----~----~------~----~------~--~---
redirect_to :controller => ''recipes'', :action => ''list'' c. Dave A. wrote:> I realize this is like a super stupid question, but I''m new and would > really appreciate an answer to this question. > > I''m setting up an authentication system, and once people sign up, it > redirects them to a welcome action like this: (users_controller.rb) > > redirect_to :action => "welcome" > > I''d prefer it if they were redirected to a list of recipes (I''m making a > little recipe site). What would I replace "welcome" with to get that to > work? Recipes.list or something like that? I''ve tried a few things, to > no avail. > > Thanks!-- 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 -~----------~----~----~----~------~----~------~--~---