What users want | CRUD | Action(URL) | Method/Verb | Data prep/manipulation | Redirect/Render | View |
---|---|---|---|---|---|---|
See all tasks | read | '/tasks' | GET | @tasks = task_manager.all | render | :index |
See one task | read | '/tasks/:id' | GET | @task = task_manager.find(id) | render | :show |
See form to put new task into | create | '/tasks/new' | GET | none | render | :new |
Submit form to create new task | create | '/tasks' | POST | task_manager.create(params[:task]) | redirect to '/tasks' | |
See a form to edit task info | update | '/tasks/:id/edit | GET | @task = task_manager.find(id) | render | :edit |
Submit form to edit task | update | '/tasks/:id' | PUT / PATCH in rails | task_manager.update(params[:task], id) | redirect to '/tasks/:id | |
Delete a task | delete | '/tasks/:id | DELETE | task_manager.delete(id) * Different in Rails | redirect to '/tasks |
Last active
March 22, 2016 20:25
-
-
Save jwashke/10ab4e143733184e3e08 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment