Skip to content
Georg edited this page Jan 18, 2018 · 6 revisions
  1. Explain the basic MVC architecture within a Rails application? ¯\(ツ)

  2. What is an Active Record and what does it do?

  3. What are Migrations in Rails?

  4. What command do you need to use to create an Article model with the title attribute of String?

ANSWERS BELOW











Answers:

  1. Explain the basic MVC architecture within a Rails application? Answer: (Line Items) Controller, (Line Items) View, (Active Record) Model <---> Database, (Browser), Routing

  2. What is an Active Record and what does it do? Answer: An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.

  3. What are Migrations in Rails? Answer: Migrations are Ruby classes that are designed to make it simple to create and modify database tables.

  4. What command do you need to use to create an Article model with the title attribute of String? Answer: $ bin/rails generate model Article title:string text:text