- Define CRUD.
- 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.
- Why do we use
set method_override: true
? - Explain the difference between
value
andname
in this line:<input type='text' name='task[title]' value="<%= @task.title %>"/>
. - What are
params
? Where do they come from?
Created
December 1, 2015 18:00
-
-
Save rwarbelow/62813b91091455a1f3d3 to your computer and use it in GitHub Desktop.
CRUD in Sinatra -- Check for Understanding
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(b) get + "/something/:id" renders an item at a time;
(c) get + "/something/new" renders a viewable form for input;
(d) post + "/something" allows an input to be submitted, and this is redirected to index view;
(e) get + "/something/:id/edit" allows for a viewable form to be inputted to be editted;
(f) put + "/something/:id" allows the above form to be submitted to be filed;
(j) delete + "/something/:id" allows to destroy a previously input.