Reputation: 13548
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?
Upvotes: 5
Views: 586
Reputation: 2589
The standard definition is as follows:
Upvotes: 13
Reputation: 22897
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.
Upvotes: 5