Merged With 100% Correct
Solutions || Already Graded A+ ||
2026-2027 Latest Update!!!
Explain model view controller - ANSWER-Model
The data (i.e. state)
Methods for accessing and modifying state
View
Renders contents of model for user
When model changes, view must be
updated
Controller
Translates user actions (i.e. interactions
with view) into operations on the model
Example user actions: button clicks, menu
selections
, Draw an example of MVC - ANSWER-http://web.cse.ohio-
state.edu/~giles/3901/lectures/lecture16.pdf slide 4
Who writes schemer and what is the golden rule? - ANSWER-It is
generated! (tool called rake)
Golden rule: Never edit schemer directly
Instead, write a migration
What is a migration? - ANSWER-A migration is Ruby code (a class) that
represents a change in schema
Create new tables (including column
names and column types)
Modify existing tables (adding/removing
columns, or changing associations)
Delete ("drop") existing tables
What is the difference between a migration and a schema? - ANSWER-
Schema is a version of the database. It is regenerated every time you
do a migration. Every change in schema means writing a
migration
What is important about migrations for table edits? - ANSWER-The
name is meaningful (starts with Add or Remove). i.e. $ rails g
migration AddNickNameToStudent
nick: string