{"action":"created","comment":{"url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/comments/43707889","id":43707889,"diff_hunk":"@@ -1,12 +1,70 @@\n require 'csv'\n-# Assessment answers to:\n+# question 1:\n+\n+class CreateLicensees < ActiveRecord::Migration\n+  def change\n+    create_table :licensee do |t|\n+      t.string :surname\n+      t.string :given_name\n+      t.string :gender\n+      t.integer :height\n+      t.integer :weight\n+      t.date :dob\n+      t.string :eye_color\n+      t.string :hair_color\n+\n+      t.timestamps null: false\n+    end\n+  end\n+end\n \n # question 2:\n \n+licensee = Licensee.create(surname: 'Bishop', given_name: 'Caren', gender: 'f', height: 63, weight: 131, dob: '1943-09-26', eye_color: 'Brown', hair_color: 'Black')\n+p licensee\n+\n # question 3:\n \n+namespace :db do\n+  namespace :populate do\n+    desc 'fill the licensee table with example data'\n+    task people: :environment do\n+      Licensee.transaction do\n+        CSV.foreach(Rails.root + 'data/licensee.csv',\n+                    headers: true) do |licensee_row|\n+          licensee = licensee_row.to_hash\n+          next if Licensee.exists? licensee\n+        Licensee.create! licensee\n+          end\n+        end\n+      end\n+    end\n+  end\n+\n # question 4:\n \n+licensee.where(licensee.eye_color = 'Hazel'), (licensee.hair_color = 'Brown' OR 'Black')\n+\n # question 5:\n \n+escobar = Licensee.find_by! surname: 'Escobar', given_name: 'Marilynn'\n+\n+escobar.height -= 1\n+\n+escobar.save!\n+\n+whaley = Licensee.find_by! surname: 'Whaley', given_name: 'Chris'\n+\n+whaley.height -= 1\n+\n+whaley.save!\n+\n # question 6:\n+\n+rich = Person.find_by! surname: 'Rich', given_name: 'Dylan'\n+\n+rich.destroy!\n+\n+myers = Person.find_by! surname: 'Myers', given_name: 'Teresita'\n+\n+myers.destroy!","path":"assessment.rb","position":71,"original_position":71,"commit_id":"a190cefa4e5990a26a8748726b006a1b8bfd7123","original_commit_id":"a190cefa4e5990a26a8748726b006a1b8bfd7123","user":{"login":"MattB-GA-Boston","id":3653013,"avatar_url":"https://avatars.githubusercontent.com/u/3653013?v=3","gravatar_id":"","url":"https://api.github.com/users/MattB-GA-Boston","html_url":"https://github.com/MattB-GA-Boston","followers_url":"https://api.github.com/users/MattB-GA-Boston/followers","following_url":"https://api.github.com/users/MattB-GA-Boston/following{/other_user}","gists_url":"https://api.github.com/users/MattB-GA-Boston/gists{/gist_id}","starred_url":"https://api.github.com/users/MattB-GA-Boston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattB-GA-Boston/subscriptions","organizations_url":"https://api.github.com/users/MattB-GA-Boston/orgs","repos_url":"https://api.github.com/users/MattB-GA-Boston/repos","events_url":"https://api.github.com/users/MattB-GA-Boston/events{/privacy}","received_events_url":"https://api.github.com/users/MattB-GA-Boston/received_events","type":"User","site_admin":false},"body":"Correct.","created_at":"2015-11-03T01:31:43Z","updated_at":"2015-11-03T01:31:43Z","html_url":"https://github.com/ga-wdi-boston/rails-crud-assessment/pull/27#discussion_r43707889","pull_request_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/comments/43707889"},"html":{"href":"https://github.com/ga-wdi-boston/rails-crud-assessment/pull/27#discussion_r43707889"},"pull_request":{"href":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/27","id":49160791,"html_url":"https://github.com/ga-wdi-boston/rails-crud-assessment/pull/27","diff_url":"https://github.com/ga-wdi-boston/rails-crud-assessment/pull/27.diff","patch_url":"https://github.com/ga-wdi-boston/rails-crud-assessment/pull/27.patch","issue_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/issues/27","number":27,"state":"open","locked":false,"title":"Complete assessment","user":{"login":"LaurenGrant","id":11621035,"avatar_url":"https://avatars.githubusercontent.com/u/11621035?v=3","gravatar_id":"","url":"https://api.github.com/users/LaurenGrant","html_url":"https://github.com/LaurenGrant","followers_url":"https://api.github.com/users/LaurenGrant/followers","following_url":"https://api.github.com/users/LaurenGrant/following{/other_user}","gists_url":"https://api.github.com/users/LaurenGrant/gists{/gist_id}","starred_url":"https://api.github.com/users/LaurenGrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaurenGrant/subscriptions","organizations_url":"https://api.github.com/users/LaurenGrant/orgs","repos_url":"https://api.github.com/users/LaurenGrant/repos","events_url":"https://api.github.com/users/LaurenGrant/events{/privacy}","received_events_url":"https://api.github.com/users/LaurenGrant/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-29T16:03:43Z","updated_at":"2015-11-03T01:31:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6e6012e70fa0e81bb12ba062455a326c51f8228","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/27/commits","review_comments_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/27/comments","review_comment_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/issues/27/comments","statuses_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/statuses/a190cefa4e5990a26a8748726b006a1b8bfd7123","head":{"label":"LaurenGrant:response","ref":"response","sha":"a190cefa4e5990a26a8748726b006a1b8bfd7123","user":{"login":"LaurenGrant","id":11621035,"avatar_url":"https://avatars.githubusercontent.com/u/11621035?v=3","gravatar_id":"","url":"https://api.github.com/users/LaurenGrant","html_url":"https://github.com/LaurenGrant","followers_url":"https://api.github.com/users/LaurenGrant/followers","following_url":"https://api.github.com/users/LaurenGrant/following{/other_user}","gists_url":"https://api.github.com/users/LaurenGrant/gists{/gist_id}","starred_url":"https://api.github.com/users/LaurenGrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaurenGrant/subscriptions","organizations_url":"https://api.github.com/users/LaurenGrant/orgs","repos_url":"https://api.github.com/users/LaurenGrant/repos","events_url":"https://api.github.com/users/LaurenGrant/events{/privacy}","received_events_url":"https://api.github.com/users/LaurenGrant/received_events","type":"User","site_admin":false},"repo":{"id":45192025,"name":"rails-crud-assessment","full_name":"LaurenGrant/rails-crud-assessment","owner":{"login":"LaurenGrant","id":11621035,"avatar_url":"https://avatars.githubusercontent.com/u/11621035?v=3","gravatar_id":"","url":"https://api.github.com/users/LaurenGrant","html_url":"https://github.com/LaurenGrant","followers_url":"https://api.github.com/users/LaurenGrant/followers","following_url":"https://api.github.com/users/LaurenGrant/following{/other_user}","gists_url":"https://api.github.com/users/LaurenGrant/gists{/gist_id}","starred_url":"https://api.github.com/users/LaurenGrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaurenGrant/subscriptions","organizations_url":"https://api.github.com/users/LaurenGrant/orgs","repos_url":"https://api.github.com/users/LaurenGrant/repos","events_url":"https://api.github.com/users/LaurenGrant/events{/privacy}","received_events_url":"https://api.github.com/users/LaurenGrant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LaurenGrant/rails-crud-assessment","description":"Assessment for \"An introduction to ActiveRecord\"","fork":true,"url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment","forks_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/forks","keys_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/teams","hooks_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/hooks","issue_events_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/issues/events{/number}","events_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/events","assignees_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/assignees{/user}","branches_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/branches{/branch}","tags_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/tags","blobs_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/git/refs{/sha}","trees_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/statuses/{sha}","languages_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/languages","stargazers_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/stargazers","contributors_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/contributors","subscribers_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/subscribers","subscription_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/subscription","commits_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/commits{/sha}","git_commits_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/git/commits{/sha}","comments_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/comments{/number}","issue_comment_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/issues/comments{/number}","contents_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/contents/{+path}","compare_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/merges","archive_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/downloads","issues_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/issues{/number}","pulls_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/pulls{/number}","milestones_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/milestones{/number}","notifications_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/labels{/name}","releases_url":"https://api.github.com/repos/LaurenGrant/rails-crud-assessment/releases{/id}","created_at":"2015-10-29T15:24:36Z","updated_at":"2015-10-29T15:24:37Z","pushed_at":"2015-10-29T16:03:24Z","git_url":"git://github.com/LaurenGrant/rails-crud-assessment.git","ssh_url":"git@github.com:LaurenGrant/rails-crud-assessment.git","clone_url":"https://github.com/LaurenGrant/rails-crud-assessment.git","svn_url":"https://github.com/LaurenGrant/rails-crud-assessment","homepage":null,"size":171,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ga-wdi-boston:master","ref":"master","sha":"2b4c835b9606caafbaeb5cfd44622f6855e44b19","user":{"login":"ga-wdi-boston","id":6361298,"avatar_url":"https://avatars.githubusercontent.com/u/6361298?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-boston","html_url":"https://github.com/ga-wdi-boston","followers_url":"https://api.github.com/users/ga-wdi-boston/followers","following_url":"https://api.github.com/users/ga-wdi-boston/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-boston/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-boston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-boston/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-boston/orgs","repos_url":"https://api.github.com/users/ga-wdi-boston/repos","events_url":"https://api.github.com/users/ga-wdi-boston/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-boston/received_events","type":"Organization","site_admin":false},"repo":{"id":39403816,"name":"rails-crud-assessment","full_name":"ga-wdi-boston/rails-crud-assessment","owner":{"login":"ga-wdi-boston","id":6361298,"avatar_url":"https://avatars.githubusercontent.com/u/6361298?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-boston","html_url":"https://github.com/ga-wdi-boston","followers_url":"https://api.github.com/users/ga-wdi-boston/followers","following_url":"https://api.github.com/users/ga-wdi-boston/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-boston/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-boston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-boston/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-boston/orgs","repos_url":"https://api.github.com/users/ga-wdi-boston/repos","events_url":"https://api.github.com/users/ga-wdi-boston/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-boston/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-wdi-boston/rails-crud-assessment","description":"Assessment for \"An introduction to ActiveRecord\"","fork":false,"url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment","forks_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/forks","keys_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/teams","hooks_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/hooks","issue_events_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/issues/events{/number}","events_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/events","assignees_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/assignees{/user}","branches_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/branches{/branch}","tags_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/tags","blobs_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/languages","stargazers_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/stargazers","contributors_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/contributors","subscribers_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/subscribers","subscription_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/subscription","commits_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/contents/{+path}","compare_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/merges","archive_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/downloads","issues_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/issues{/number}","pulls_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/labels{/name}","releases_url":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/releases{/id}","created_at":"2015-07-20T19:22:34Z","updated_at":"2015-10-26T18:28:38Z","pushed_at":"2015-10-30T01:10:26Z","git_url":"git://github.com/ga-wdi-boston/rails-crud-assessment.git","ssh_url":"git@github.com:ga-wdi-boston/rails-crud-assessment.git","clone_url":"https://github.com/ga-wdi-boston/rails-crud-assessment.git","svn_url":"https://github.com/ga-wdi-boston/rails-crud-assessment","homepage":null,"size":171,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":19,"forks":42,"open_issues":19,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/27"},"html":{"href":"https://github.com/ga-wdi-boston/rails-crud-assessment/pull/27"},"issue":{"href":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/issues/27"},"comments":{"href":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/ga-wdi-boston/rails-crud-assessment/statuses/a190cefa4e5990a26a8748726b006a1b8bfd7123"}}}}