- Define CRUD. create, read, update, delete. everything a web app should do.
- There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for. see all the assets (READ-GET-RENDER) see one of the assets (READ-GET-RENDER) see a form to create a new asset (CREATE-GET-RENDER) submit the filled form, save the new asset (CREATE-POST-REDIRECT) see a form to edit an exsisting asset (UPDATE-GET-RENDER) submit the filled form, save the edited asset (UPDATE-POST-REDIRECT) delete an asset (DELETE-DELETE-REDIRECT)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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? | |
#### Write down one example of: | |
* a `one-to-one `relationship. | |
* a `one-to-many relationship`. | |
* a `many-to-many relationship`. |
to get requests from the client/user and send responses/ content. The gateway between the client/user and the content of the app.
You can pass instance variables that are defined in the get block above the erb :route method. You can send local variables using symbols(the name you gave the variable) and hashes(wherin the key is the symbol and the value is the value).