So here's one way to think about routes:
-- retrieving data about a contact or contacts
# index GET /contacts Contact.all
# show GET /contacts/1 Contact.find(1)
-- helping you create a new contact
# new GET /contacts/new Contact.new
# create POST /contacts Contact.create(...)
-- helping you update a single contact
# edit GET /contacts/1/edit Contact.find(1).name=
# update PUT /contacts/1 Contact.find(1).update_attributes(name: 'The man', street: 'Best St.')
-- destroy a contact
# destroy DELETE /contacts/1 Contact.find(1).destroyAnother way of thinking about this is which routes deal with the collection of objects and which routes deal with a single member of the collection of objects:
# -- collection routes
# index GET /contacts
# new GET /contacts/new
# create POST /contacts
# -- member routes
# show GET /contacts/1
# edit GET /contacts/1/edit
# update PUT /contacts/1
# destroy DELETE /contacts/1Yet another way to think about this is which routes should redirect and which should render:
-- render
# index GET /contacts
# new GET /contacts/new
# edit GET /contacts/1/edit
# show GET /contacts/1 Contact.find(1)
-- redirect
# create POST /contacts -> index or show
# update PUT /contacts/1 -> show
# destroy DELETE /contacts/1 -> index