Forum: Ruby on Rails url_for leave out 'index' action

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Manish S. (Guest)
on 2006-03-31 23:47
(Received via mailing list)
I'm trying to reduce the size of urls in my app and i was wondering how
can get all links to an index action to leave out the 'index'.  In my
routes.rb, i have it setup to recognize the controller and default to
index action.

But is there a way to make it so that the 'index' portion in the url is
shown to the user?  This is mostly a concern where in other controllers
use redirect_to and link_to that index action of a particular

For example:  i have controller_a and i want to get to its index action.
know i can just use

but when i do link_to and redirect_to :controller => controller_a, it
controller_a/index in the url.  I'd like to leave off the 'index'

Thanks for the help.
Manish S. (Guest)
on 2006-04-01 11:23
(Received via mailing list)
can anyone help me out?
This topic is locked and can not be replied to.