I’ve tried searching but I’m not sure what terminology that I should
search
for: “default route/routing”, “route edit”, etc…didn’t turn up
anything
useful.
are you using restful routes? In any case, that’s quite strange… The
default should be
:controller/:action/:id
You’re also missing the controller name for some reason.
is this a new rails application? Have you messed around with the
routes file? Do all your urls for different controllers show up this
same way? Are you using nested resources?
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
level directory:
rake routes
How do I override it?
These resources are used when you have lines like this in your
config/routes.rb file:
map.resources :controller
If you comment this out, you will see that there is a line later which
reads:
map.connect ‘:controller/:action/:id’
which will then provide you with the form of URLs you are looking for.
Running the rake command again will show the difference.