###The server file contains http verbs that dictate how a page is rendered, what logic is executed and what will be sent back to the client.
###Pass a var to the server file. The server file uses ERB to translate a designated file in the views dir.
###The server file contains http verbs that dictate how a page is rendered, what logic is executed and what will be sent back to the client.
###Pass a var to the server file. The server file uses ERB to translate a designated file in the views dir.
## Models, Databases, Relationships in Rails | |
#### What is the difference between a primary key and a foreign key? Where would we find a primary key? What would it be called by default? Where would we find a foreign key? What is the naming convention for a foreign key? | |
* Primary key lives on the one side of a one to many relationship. It is generally called tablename_id. The "many" object in the relationship holds on to a forieign key that uniqely identifies it's "one" association. | |
#### Write down one example of: | |
* a `one-to-one `relationship. | |
* Citizen to SSN | |
* One king to one kingdom | |
* a `one-to-many relationship`. | |
* One kingdom has many peasants |