hi, guys,
I found that some of my paths are getting an "_index" appended to
it.
Reading
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/8c9c84e884680f90,
it says that rails does so when an uncountable resource is being
mapped, "_index" will be appended to the end of the path.
Here''s what I used in my routes:
=====================
# Static routes
map.resources :terms_and_conditions, :only => [''index'']
map.resources :frequently_asked_questions, :only =>
[''index'']
map.resources :downloads, :only => [''index'']
map.resources :share, :only => [''index'']
map.resources :shared_codes, :only => [''index'']
map.resources :how_to, :only => [''index'']
map.resources :help, :only => [''index'']
map.resources :orders, :only => [''index'']
and here''s what rake gives:
=====================
terms_and_conditions GET /
terms_and_conditions(.:format)
{:controller=>"terms_and_conditions",
:action=>"index"}
frequently_asked_questions GET /
frequently_asked_questions(.:format)
{:controller=>"frequently_asked_questions",
:action=>"index"}
downloads GET /
downloads(.:format)
{:controller=>"downloads", :action=>"index"}
share_index GET /
share(.:format)
{:controller=>"share", :action=>"index"}
shared_codes GET /
shared_codes(.:format)
{:controller=>"shared_codes", :action=>"index"}
how_to_index GET /
how_to(.:format)
{:controller=>"how_to", :action=>"index"}
help_index GET /
help(.:format)
{:controller=>"help", :action=>"index"}
orders GET /
orders(.:format)
{:controller=>"orders", :action=>"index"}
I noticed that if I put a plural resource, rails will not do so but
when I use a singular resource, then rails will likely put a "_index"
there.
I have googled abit and checked out some books.
Can anyone point me some doc for me to read up more?
thanks, all :)
--
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.