> amritpal p. wrote in post #995099:
>
> ok .Done
> "root :to => "say#hello"". Still unsussess.
> No route matches "/say/hello"
>
> Thank you.

Quoted from the Rails guide: "You should put the root route at the end
of the file. You also need to delete the public/index.html.erb file for
the root route to take effect."

Rails will look in app/controllers for a controller named
'say_controller'. Inside that, it will search for an action with the
name 'hello' and then will render that action using hello.html.erb in
app/views/say

If it is not doing this, then there is something you've omitted when
trying to explain the issue.

What is the output of rake routes?

What happens if you match 'say', :to => 'say#hello' and navigate your
browser to /say?

Please see the following screencasts for routing in Rails 3.x:

http://railscasts.com/episodes/231-routing-walkthrough
http://railscasts.com/episodes/232-routing-walkthrough-part-2

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to