Instead of creating the URL as http://site.com/edit/1 it sticks the ID
This should be more like:
1. What exactly is the reason behind this default?
These are RESTful routes. Google for "rails REST routes" or "rails 2
scaffolding" and you should get some useful info. Basically, it's a way
of treating your database objects as resources and performing actions on
them. Many actions involve just the HTTP method (GET, POST, PUT,
DELETE) (the verbs of the request) and either the controller name or the
controller plus an object's id field (the nouns of the request). The
appended actions (like "edit" above) extend this "language". This means
that the resource is:
and the action to be performed is encoded in the HTTP method (possibly
augmented by an appended action to the resource). To see how this is
put together, run the following command from your application's top
2. How do I override it?
These resources are used when you have lines like this in your
If you comment this out, you will see that there is a line later which
which will then provide you with the form of URLs you are looking for.
Running the rake command again will show the difference.