Skip to content

Instantly share code, notes, and snippets.

@leahgarrett
Last active April 23, 2019 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leahgarrett/698924d567e1f6ef8ab0d0b5b24af5b5 to your computer and use it in GitHub Desktop.
Save leahgarrett/698924d567e1f6ef8ab0d0b5b24af5b5 to your computer and use it in GitHub Desktop.
Tuesday Rails Revision Diagram and Kahoots Solution

Rails Revision

Overview diagram:

Restaurant app:
https://github.com/leahgarrett/rails-01-restaurant

Commit where Bootstrap was added:
https://github.com/leahgarrett/rails-01-restaurant/commit/861d89b8b53c4519f5fe981fb7a54e6cb8fb421a


Rails Revision Kahoot

  1. What value does the puts method return? a. undefined
    b. 0
    c. The string it prints
    d. nil
    Correct Answer: d

  2. How do you create a rails app called first_app?
    a. rails create first_app
    b. new rails first_app
    c. rails new first_app
    d. rails.new first_app
    Correct Answer: c.

  3. How can we send data in a GET request?
    a. By using our Model
    b. We can't send data through a GET request
    c. In the body of the request
    d. Through query parameters
    Correct Answer: d.

  4. A router will send data to our
    a. View
    b. Model
    c. Controller
    d. Database
    Correct Answer: c.

  5. How do I create a new rails app called new_app with Postgres as my database?
    a. rails new new_app
    b. rails new new_app -d postgres
    c. rails -d postgres new new_app
    d. rails new_app -d postgres
    Correct Answer: b.

  6. What does CRUD stand for?
    a. Control Read Update Destroy
    b. Create Read Update Delete
    c. Create Run Unless Delete
    d. Create Read Unless Dynasty
    Correct Answer: b.

  7. How do you start a rails server?
    a. rails s
    b. rails server
    c. rails start
    d. rails start server
    Correct Answer: c. and d.

  8. In MVC what is the controller?
    a. The glue that holds together the model and the view
    b. Anything the user can see on the web page
    c. Responsible for managing the data in a web application
    d. An architectural pattern, separates an app into 3 components
    Correct Answer: a.

  9. What kind of relationship does a restaurant have with their reviews?
    a. has_many
    b. belongs_to
    c. has_one
    d. has_and_belongs_to_many
    Correct Answer: a.

  10. What type of data will the following return "word".split?
    a. Array
    b. String
    c. Hash
    d. Number
    Correct Answer: a.

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