Before all, this question is about Rails 2.x.
I live in a spanish language country and the URLs for my web apps should be in spanish. I always created spanish spelled actions for my controllers until now, but that just turn off many of the advantages for using REST, like the built-in PUT method => edit action stuff.
So, I wanna know how to modify the routes.rb file for redirect all the traffic for all my existing and future resources without losing the RESTful standars.
Is this possible?
Example:
POST /inmuebles
:controller => inmuebles, :action => create
GET /inmuebles
:controller => inmuebles, :action => index
GET /inmuebles/nuevo
:controller => inmuebles, :action => new
Piggy backing off of Andrew V’s answer, but couldn’t preview my comment…
Since all of your resources will likely have the same actions that need the same path names, you can use a with_options block to set these for all routes.
For example: