A very basic issue with routes in ruby

Posted by Haris on Stack Overflow See other posts from Stack Overflow or by Haris
Published on 2010-12-23T13:50:06Z Indexed on 2010/12/23 13:54 UTC
Read the original article Hit count: 312

I am new to ruby and while creating a sample application found out an issue that whenever I go to http://127.0.0.1:3000/people/index by default show action is executed and index is taken as a parameter. This is server log:

 Started GET "/people/index" for
 127.0.0.1 at 2010-12-23 18:43:01 +0500 Processing by PeopleController#show as
 HTML Parameters: {"id"=>"index"}

I have this in my route file:

root :to => "people#index"   
resources> :people
match ':controller(/:action(/:id(.:format)))'

What is going on here and how can I fix the issue?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about routes