- Define CRUD. Create, Read, Update, Delete
- 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.
** - Read/GET **
** - Read/GET **
** - Create/GET **
** - Create/POST **
** - Update/GET **
** - Update/PUT **
** - Delete/DELETE ** - Why do we use
set method_override: true
?
** So that the browser will know to look for a hidden verb (not post or get) and overwrite is with the "_method" verb ** - Explain the difference between
value
andname
in this line:<input type='text' name='task[title]' value="<%= @task.title %>"/>
.
** Name here is the title of the task in the "name" section, in value it's a Ruby evaluated bit of code calling for the title from a task instance variable. ** - What are
params
? Where do they come from?
** That's the parameters, taken from the end of the request url **
Forked from rwarbelow/cfu_crud_in_sinatra.markdown
Last active
February 3, 2016 01:55
-
-
Save brennanholtzclaw/220b6dac31c773bec7a1 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