:delete actions keywords in the router?
For instance, is a route to
:index action in controller always a GET rest operation?
And does there always have to be an
:index action? I would like to create a GET ‘/’ operation, but with my own custom function name, not named index. Is that possible?
resources macro is meant to create a common rest setup for a controller, but you can always create other routes using
post, … macros.
Thanks, I should have asked, are the 7 actions reserved keywords? E.g. with a
User model, is
:index always with GET and
/users , and
:show is with GET and
No, using the
resource macro just sets up a bunch of conventional routes, if you specify them one by one, you can use whatever scheme and names you want for your actions.