# "\_index" gets appended to paths

**URL:** <https://www.ruby-forum.com/t/index-gets-appended-to-paths/191805>\
**Category:** Rails\
**Created:** [July 19, 2010, 3:21am UTC](https://www.ruby-forum.com/t/index-gets-appended-to-paths/191805 "2010-07-19T03:21:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ct9a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@ct9a](https://www.ruby-forum.com/u/ct9a)\
**Post date:** [July 19, 2010, 3:21am UTC](https://www.ruby-forum.com/t/index-gets-appended-to-paths/191805/1 "2010-07-19T03:21:52Z")

</div>

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](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 🙂
