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
# app.rb | |
require 'sinatra' | |
require 'json' | |
require 'data_mapper' | |
DataMapper.setup(:default, ENV['DATABASE_URL']) | |
get '/' do | |
@messages = Message.all |
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
Show hidden characters
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Solarized Color Scheme (TextMate)/Solarized (light).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
".tags*", | |
"*.pyc", |
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
INSERT INTO question (content, quizzes_id) | |
VALUES | |
("Who is the father of relational databases?", 2), | |
("What is referential integrity?", 2), | |
("In a one to many relationship, which table contains the foreign key?", 2), | |
("What is a normalized table?", 2), | |
("How many different type of joins are there?", 2); | |
INSERT INTO choices (content, correct, questions_id) | |
VALUES |
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
INSERT INTO user (id, first_name, email) | |
VALUES ( 0, "Josh", "[email protected]"); | |
INSERT INTO user (id, first_name, email) | |
VALUES ( 1, "Aaron", "[email protected]"); | |
INSERT INTO user (id, first_name, email) | |
VALUES ( 2, "Matt", "[email protected]"); | |
INSERT INTO user (id, first_name, email) |
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
CREATE TABLE user ( | |
id INTEGER PRIMARY KEY, | |
first_name TEXT, | |
email TEXT | |
); | |
CREATE TABLE quiz ( | |
id INTEGER PRIMARY KEY, | |
user_id INTEGER, | |
name TEXT |
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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Flatiron School - Developing Professionals</title> | |
<meta name="HandheldFriendly" content="True"> | |
<meta name="MobileOptimized" content="320"> | |
<meta name="viewport" content="width=device-width; initial-scale=1.0"> | |
<link type="text/plain" rel="lol" href="/humans.lol/"> |
NewerOlder