Hi!
Is it good when url to show and destroy are same? How it can be changed in RoR if i want continue use standard tools like script/generate scaffold ?
Thanks.
Hi!
Is it good when url to show and destroy are same? How it can be changed in RoR if i want continue use standard tools like script/generate scaffold ?
Thanks.
If you are following the REST convention Rails recommends, the url of a resource (noun) would be /resource_name/id for view, delete, update, and the difference will be the HTTP method (verb) you issue to the server: GET, POST, PUT, and DELETE.
Yes, this is good. Rails use the URL as well as the HTTP verb (GET, POST, PUT, DELETE) to determine which action a request should resolve to. script/generate scaffold
has this behaviour, so you can continue to use it.