amritpal p. wrote in post #995520:
> On Apr 28, 3:25am, Colin Law <clan...@googlemail.com> wrote:
>>
>> > root :to => "say#hello"
>>
>> So you think that the above line, which says route '/' to say#hello'
>> is going to route /say/goodbye somewhere?
> No it will not route to /say/goodbye,but it will route to /say/
> hello which has a link to /say/goodbye method.
Umm... no it won't, as evidenced by your own statement:
> When i click on Goodbye link given in hello.html.erb file it says
> "No route matches "/say/goodbye".
Take a look at your log file and see what your Rails application is
receiving when you click the "Goodbye" link in the browser. Review your
routes.rb file. If you run a
rake routes > routes.lst
then look at the routes.lst file, you'll know exactly what routes you
have available in your application. Next, re-read the Rails guide on
routing.
I hesitate to just say "type this code in here and it will work" because
that doesn't lead to learning or understanding. Directing you to look
at your log file to see what your application is receiving, seeing what
Rails has as routes for your application, and pointing to the correct
reference for reading may.
It's the old "give a man a fish..." strategy.
--
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@googlegroups.com.
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.
No comments:
Post a Comment