Skip to content

Instantly share code, notes, and snippets.

@Ryanspink1
Forked from case-eee/crud_cfu.md
Last active January 24, 2017 06:38
Show Gist options
  • Save Ryanspink1/564996550c29787ad3c7c36c9d48e4f0 to your computer and use it in GitHub Desktop.
Save Ryanspink1/564996550c29787ad3c7c36c9d48e4f0 to your computer and use it in GitHub Desktop.
CRUD CFU Questions
  1. Define CRUD. ###CRUD is create, read, update, and delete. It provides basic functionality/methods to our database.

  2. Why do we use set method_override: true? ###it allows the use of _method in the form.

  3. Explain the difference between value and name in this line: <input type='text' name='task[title]' value="<%= @task.title %>"/>. ###name is the value of the key title from the hash task ###value is coming from the instance variable task that hold the info title ###not entirely sure on this

  4. What are params? Where do they come from? ###these are the parameters of the task which include the title and description of the task.

  5. Check out your routes. Why do we need two routes each for creating a new Task and editing an existing Task? ###one method sends it to the ERB that updates what you see and one sends it to the actual Task object that changes it’s parameters. ###not entirely sure on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment