- Define CRUD.
- Create, Read, Update, Delete. Gives us all the behavior to make a fully-functional web application
-
There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for.
-
GET
"/tasks"
- displays all the current tasks with the:index
view -
GET
"/tasks/:id"
- display a single task with the:show
view -
GET
"/tasks/new"
- display the form to create a new task with the:new
view -
POST
"/tasks"
- write a task to the database, and redirect back to"/tasks"
-
GET
"/tasks/:id/edit"
- display the form for editing an existing task with the:edit
view -
PUT
/PATCH
"tasks/:id"
- update a specific task in the database with new data, and display the edited task by redirecting back to"/tasks/:id"
-
DELETE
"tasks/:id"
- delete an existing task from the database and redirect back to"/tasks"
-
Why do we use set method_override: true?
-
Explain the difference between value and name in this line: .
-
What are params? Where do they come from?