Skip to content

Instantly share code, notes, and snippets.

@Jbern16
Jbern16 / cfu_crud_in_sinatra.markdown
Last active March 23, 2016 04:10 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  1. Define CRUD. create, read, update, delete

  2. 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

  3. Why do we use set method_override: true? to set the form to put or delete instead of the default value of post. We override the verb.

  4. Explain the difference between value and name in this line: ``.

Introduction to Sinatra

1. What is the purpose of the server file (routing)?

To act accordingingly to whatever is sent to the server.

2. How do you pass variables into the views?

through instance vairables or locals

3. How can we interpolate ruby into a view (html)?

Jonathan/Thomas Pickett Black Thursday DTR

JB:

  • Prefers to leave for dinner around 7:30
  • Prefers to work after school after a short break
  • Prefers to work together at all times(pairings)
  • Likes to swap driving of code.
  • Strengths :Problem solving, Testing
  • Weaknesses : Ruby Syntax