I am new to RESTful stuff. But, I want to use it in my rails app. When I add this to my routes.rb map.resources :notes
I get routes to these methods created:
What I am wondering is what is the difference between edit/update and create/new? Is there any standard definitions of how these method pairs vary and what each one does?
Running REST commands in the command-line interface The Linux program curl is one of many programs that can run REST commands from the command line. For an example, see Running REST commands.
Overview. A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services. REST stands for representational state transfer and was created by computer scientist Roy Fielding.
The standard definition is as follows:
When you use the scaffold generator in Rails 2 create
is the action called when the form from the new
action is submitted. Likewise, update
is the action called when the form from the edit
action is submitted.
As far as I know, you can blow that away and define them to do whatever you want depending on what create/new/edit/update
means to your application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With