Useful Commands

I am new to RESTful stuff. But I want to use it in my rails application. When I add it to my routes. Rb map.resources :notesI get routes to these generated methods:

  • Index
  • create
  • new
  • change
  • show
  • update
  • destroy

What interests me is what is the difference between editing / updating and creating / new? Are there standard definitions of how these pairs of methods change and what everyone does?

+5
source share
2 answers

Rails 2 create - , new. , update - , edit.

, , , , , create/new/edit/update .

+5

:

  • index - GET - ( )
  • - GET -
  • - GET -
  • - POST -
  • edit - GET -
  • update - PUT -
  • - -
+13

All Articles