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
Rails Course 2 - Quiz: Lesson 1 | |
1. They call it a relational database because it is used to create, edit, retrieve and store related sets of data. | |
2. SQL - stands for Structured Query Language, and it is the language used to manipulate a relational database. | |
3. The two predominate views into a database are: the data view, and the schema view. The data view displays a tables' | |
columns and the rows it contains. Similar to the view of spreadsheet. The schema view displays information about the | |
column names in the database and their associated data types. |
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
Lesson 2 Quiz answers | |
1. Using the resources keyword exposes the following routes: | |
(ex. resources :posts) | |
GET /posts posts#index posts | |
GET /posts/:id posts#show post | |
GET /posts/new posts#new new_post | |
POST /posts posts#create | |
GET /posts/:id/edit posts#edit edit_post |
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
Tealeaf Course 2 - Lesson 3 Quiz | |
Quiz: Lesson 3 | |
1. The difference between rendering and redirecting is in what the request actually returns. With a render you are receiving a payload which consists of markup to display on a page along with other code (css, javascript, etc). With a redirect the request is returning a URL, which the browser then knows how to follow (which issues a new request). The impact of these two http return types on instance variables and view templates are that instance variables can only be displayed in a view when rendering a template. Redirects only contain url data for a new request. | |
2. The easiest way to display a message on the view template when redirecting is by storing a value in the flash and then displaying it in the layout template between requests. | |
3. The easiset was to display a message on a view template when rendering is to include the message in the template itself using erb, html, or string interpolation. |
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
Setup ruby environment | |
use rvm to get to ruby 2.1.1 | |
postgres was installed on cloud 9 - but need to create a user and password | |
followed blog post on this http://www.gotealeaf.com/blog/how-to-install-postgres-for-linux | |
w/ a few notes... | |
sudo sudo -u postgres psql (to get to postgres CL in cloud9) |