By default Ruby on Rails resources use the controller name for the URL. For example:
would yield the following URLs
What if you want them to be something else entirely? I guess you could rename your controller, update your routes.rb file and everywhere you use a URL helper... or, just use the "as" modifier!
map.resources :time_entries, :as => :time
now yields the following URLs
All of your existing uses of the URL helpers can remain the same and it will generate all URLs correctly. Quick, simple and painless!
Need web application development, maintenance for your existing app, or a third party code review?
Velocity Labs can help.Hire us!