A silly as this sounds, I''m not sure how to set the route for the home_path and home_url helpers. Google has nothing on this. Where do I define what those paths should resolve to? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read the comments in the config/route.rb file. On Fri, May 20, 2011 at 10:06 PM, Taylor Strait <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> A silly as this sounds, I''m not sure how to set the route for the > home_path and home_url helpers. Google has nothing on this. Where do I > define what those paths should resolve to? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
As of Rails 3.0.3, there are no comments in routes.rb that relate to the creation of home_url and home_path. There is a mention of root: # You can have the root of your site routed with "root" # just remember to delete public/index.html. # root :to => "welcome#index" but that it all. I just want to know why in my app, this action: --- redirect_to(home_url, :notice => "Completed") --- Returns the following error: --- NameError in InvitationsController#complete_thing undefined local variable or method `home_url'' for #<InvitationsController:0x52ba788> --- -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, May 21, 2011 at 1:53 AM, Taylor Strait <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> As of Rails 3.0.3, there are no comments in routes.rb that relate to the > creation of home_url and home_path. There is a mention of root: > > # You can have the root of your site routed with "root" > # just remember to delete public/index.html. > # root :to => "welcome#index" > > but that it all. > > I just want to know why in my app, this action: > > --- > redirect_to(home_url, :notice => "Completed") > --- > > Returns the following error: > > --- > NameError in InvitationsController#complete_thing > > undefined local variable or method `home_url'' forhave you tried using ''/'' instead of home_url?> #<InvitationsController:0x52ba788> > --- > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Alex, Using ''/'' works, so thanks for that suggestion. Unfortunately we haven''t gotten any closer solving the mystery of the missing home_url method. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, May 21, 2011 at 1:53 PM, Taylor Strait <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> As of Rails 3.0.3, there are no comments in routes.rb that relate to the > creation of home_url and home_path. There is a mention of root: > > # You can have the root of your site routed with "root" > # just remember to delete public/index.html. > # root :to => "welcome#index" > > but that it all. > > I just want to know why in my app, this action: > > --- > redirect_to(home_url, :notice => "Completed") > --- > > Returns the following error: > > --- > NameError in InvitationsController#complete_thing > > undefined local variable or method `home_url'' for > #<InvitationsController:0x52ba788> > --- > >i believe what you want is root_url and not home_url. also check rake routes and see if you really have a home_path/url declared.> -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.