{"action":"created","comment":{"url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/comments/32888225","id":32888225,"diff_hunk":"@@ -1,7 +1,85 @@\n-# This file should contain all the record creation needed to seed the database with its default values.\n-# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).\n-#\n-# Examples:\n-#\n-#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])\n-#   Mayor.create(name: 'Emanuel', city: cities.first)\n+class Seed\n+  def self.start\n+    new.generate\n+  end\n+\n+  def generate\n+    create_users\n+    create_items\n+    create_categories\n+  end\n+\n+  def create_users\n+    users.each do |full_name, email, password, role, display_name|\n+      User.create fullname: full_name, email: email, password: password, role: role, display_name: display_name\n+    end\n+    puts \"Users: #{User.all.map(&:fullname).join(\", \")} created.\"\n+  end\n+\n+\n+  def create_categories\n+    categories.each do |name|\n+      Category.create(name: name)\n+    end\n+    puts \"Category: #{Category.all.map(&:name).join(\", \")} created.\"\n+  end\n+\n+  def create_items\n+    item.each do |title, description, price|\n+      category = Category.find_by(id)\n+      category.items.create(title: title, description: description, price: price)\n+    end\n+    puts \"Items: #{Item.all.map(&:title).join(\", \")} created.\"\n+  end\n+\n+  # def create_orders\n+  #   orders.each do |user_id, status, total|\n+  #     Order.create(user_id: user_id, status: status, total: total)\n+  #   end\n+  #   puts \"Orders: #{Order.all.map(&:user_id).join(\", \")} created.\"\n+  # end\n+\n+  def users\n+    [\n+      [User.create id: 1, full_name: \"Rachel Warbelow\", display_name: 50.00, email: \"demo+rachel@jumpstartlab.com\", password: \"password\", role: 0]\n+      [User.create id: 2, full_name: \"Jeff Casimir\", display_name: \"j3\", email: \"demo+jeff@jumpstartlab.com\", password: \"password\", role: 0]\n+      [User.create id: 3, full_name: \"Jorge Tellez\", display_name: \"novohispano\", email: \"demo+jorge@jumpstartlab.com\", password: \"password\", role: 0]\n+      [User.create id: 4, full_name: \"Josh Cheek\", display_name: \"josh\", email: \"demo+josh@jumpstartlab.com\", password: \"password\", role: 1]\n+    ]\n+  end\n+\n+  def categories\n+    [\n+      [Category.create id: 1, name: \"Vampire\"]\n+      [Category.create id: 2, name: \"Werewolf\"]\n+      [Category.create id: 3, name: \"Zombie\"]\n+      [Category.create id: 4, name: \"Ghost\"]\n+      [Category.create id: 5, name: \"Other\"]\n+    ]\n+  end\n+\n+  def items\n+    [\n+      [Item.create id: 1, title: \"Eat Cheese & Die - Grilled Cheese\", description: \"The ooziest grilled cheese\", price: 50.00]\n+      [Item.create id: 2, title: \"Welcome to Dead House\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 3, title: \"Monster Blood\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 4, title: \"Let's Get Invisible\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 5, title: \"The Ghost Next Door\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 6, title: \"The Haunted Mask\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 7, title: \"Deep Trouble\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 8, title: \"Go Eat Worms\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 9, title: \"Ghost Beach\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 10, title: \"Attack of the Mutant\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 11, title: \"The Barking Ghost\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 12, title: \"Tick Tock You're Dead\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 13, title: \"Bad Hare Day\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 14, title: \"The Coo Coo Cloock of Doom\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 15, title: \"My Hairiest Adventure\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 16, title: \"The Return of the Mummy\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 17, title: \"Why I am Afraid of Bees\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 18, title: \"You Can't Scare Me\", description: \"Spooky Spooky Spooky\", price: 50.00]\n+      [Item.create id: 19, title: \"The Girl Who Cried Monster\", description: \"Spooky Spooky Spooky\", price: 50.00]","path":"db/seeds.rb","position":88,"original_position":88,"commit_id":"c3213fba8f6f1171206cdde46776488001df42fc","original_commit_id":"c3213fba8f6f1171206cdde46776488001df42fc","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"unexpected token tLABEL","created_at":"2015-06-20T21:26:38Z","updated_at":"2015-06-20T21:26:38Z","html_url":"https://github.com/morganmiller/dinner_dash/pull/48#discussion_r32888225","pull_request_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/comments/32888225"},"html":{"href":"https://github.com/morganmiller/dinner_dash/pull/48#discussion_r32888225"},"pull_request":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/48","id":38174631,"html_url":"https://github.com/morganmiller/dinner_dash/pull/48","diff_url":"https://github.com/morganmiller/dinner_dash/pull/48.diff","patch_url":"https://github.com/morganmiller/dinner_dash/pull/48.patch","issue_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/48","number":48,"state":"open","locked":false,"title":"add seed data","user":{"login":"tgraham777","id":10191383,"avatar_url":"https://avatars.githubusercontent.com/u/10191383?v=3","gravatar_id":"","url":"https://api.github.com/users/tgraham777","html_url":"https://github.com/tgraham777","followers_url":"https://api.github.com/users/tgraham777/followers","following_url":"https://api.github.com/users/tgraham777/following{/other_user}","gists_url":"https://api.github.com/users/tgraham777/gists{/gist_id}","starred_url":"https://api.github.com/users/tgraham777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgraham777/subscriptions","organizations_url":"https://api.github.com/users/tgraham777/orgs","repos_url":"https://api.github.com/users/tgraham777/repos","events_url":"https://api.github.com/users/tgraham777/events{/privacy}","received_events_url":"https://api.github.com/users/tgraham777/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-20T21:26:35Z","updated_at":"2015-06-20T21:26:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"808238226d7d59c576845b2d425fae1ebf7fd300","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/48/commits","review_comments_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/48/comments","review_comment_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/48/comments","statuses_url":"https://api.github.com/repos/morganmiller/dinner_dash/statuses/c3213fba8f6f1171206cdde46776488001df42fc","head":{"label":"morganmiller:seed_data","ref":"seed_data","sha":"c3213fba8f6f1171206cdde46776488001df42fc","user":{"login":"morganmiller","id":8868319,"avatar_url":"https://avatars.githubusercontent.com/u/8868319?v=3","gravatar_id":"","url":"https://api.github.com/users/morganmiller","html_url":"https://github.com/morganmiller","followers_url":"https://api.github.com/users/morganmiller/followers","following_url":"https://api.github.com/users/morganmiller/following{/other_user}","gists_url":"https://api.github.com/users/morganmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/morganmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganmiller/subscriptions","organizations_url":"https://api.github.com/users/morganmiller/orgs","repos_url":"https://api.github.com/users/morganmiller/repos","events_url":"https://api.github.com/users/morganmiller/events{/privacy}","received_events_url":"https://api.github.com/users/morganmiller/received_events","type":"User","site_admin":false},"repo":{"id":37473171,"name":"dinner_dash","full_name":"morganmiller/dinner_dash","owner":{"login":"morganmiller","id":8868319,"avatar_url":"https://avatars.githubusercontent.com/u/8868319?v=3","gravatar_id":"","url":"https://api.github.com/users/morganmiller","html_url":"https://github.com/morganmiller","followers_url":"https://api.github.com/users/morganmiller/followers","following_url":"https://api.github.com/users/morganmiller/following{/other_user}","gists_url":"https://api.github.com/users/morganmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/morganmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganmiller/subscriptions","organizations_url":"https://api.github.com/users/morganmiller/orgs","repos_url":"https://api.github.com/users/morganmiller/repos","events_url":"https://api.github.com/users/morganmiller/events{/privacy}","received_events_url":"https://api.github.com/users/morganmiller/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morganmiller/dinner_dash","description":"","fork":false,"url":"https://api.github.com/repos/morganmiller/dinner_dash","forks_url":"https://api.github.com/repos/morganmiller/dinner_dash/forks","keys_url":"https://api.github.com/repos/morganmiller/dinner_dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morganmiller/dinner_dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morganmiller/dinner_dash/teams","hooks_url":"https://api.github.com/repos/morganmiller/dinner_dash/hooks","issue_events_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/events{/number}","events_url":"https://api.github.com/repos/morganmiller/dinner_dash/events","assignees_url":"https://api.github.com/repos/morganmiller/dinner_dash/assignees{/user}","branches_url":"https://api.github.com/repos/morganmiller/dinner_dash/branches{/branch}","tags_url":"https://api.github.com/repos/morganmiller/dinner_dash/tags","blobs_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morganmiller/dinner_dash/statuses/{sha}","languages_url":"https://api.github.com/repos/morganmiller/dinner_dash/languages","stargazers_url":"https://api.github.com/repos/morganmiller/dinner_dash/stargazers","contributors_url":"https://api.github.com/repos/morganmiller/dinner_dash/contributors","subscribers_url":"https://api.github.com/repos/morganmiller/dinner_dash/subscribers","subscription_url":"https://api.github.com/repos/morganmiller/dinner_dash/subscription","commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/morganmiller/dinner_dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/comments{/number}","contents_url":"https://api.github.com/repos/morganmiller/dinner_dash/contents/{+path}","compare_url":"https://api.github.com/repos/morganmiller/dinner_dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morganmiller/dinner_dash/merges","archive_url":"https://api.github.com/repos/morganmiller/dinner_dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morganmiller/dinner_dash/downloads","issues_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues{/number}","pulls_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls{/number}","milestones_url":"https://api.github.com/repos/morganmiller/dinner_dash/milestones{/number}","notifications_url":"https://api.github.com/repos/morganmiller/dinner_dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morganmiller/dinner_dash/labels{/name}","releases_url":"https://api.github.com/repos/morganmiller/dinner_dash/releases{/id}","created_at":"2015-06-15T15:18:40Z","updated_at":"2015-06-18T22:35:22Z","pushed_at":"2015-06-20T21:26:36Z","git_url":"git://github.com/morganmiller/dinner_dash.git","ssh_url":"git@github.com:morganmiller/dinner_dash.git","clone_url":"https://github.com/morganmiller/dinner_dash.git","svn_url":"https://github.com/morganmiller/dinner_dash","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":0,"default_branch":"master"}},"base":{"label":"morganmiller:master","ref":"master","sha":"89db583dd5ab2649baa73f0d522b8165ee819fb0","user":{"login":"morganmiller","id":8868319,"avatar_url":"https://avatars.githubusercontent.com/u/8868319?v=3","gravatar_id":"","url":"https://api.github.com/users/morganmiller","html_url":"https://github.com/morganmiller","followers_url":"https://api.github.com/users/morganmiller/followers","following_url":"https://api.github.com/users/morganmiller/following{/other_user}","gists_url":"https://api.github.com/users/morganmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/morganmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganmiller/subscriptions","organizations_url":"https://api.github.com/users/morganmiller/orgs","repos_url":"https://api.github.com/users/morganmiller/repos","events_url":"https://api.github.com/users/morganmiller/events{/privacy}","received_events_url":"https://api.github.com/users/morganmiller/received_events","type":"User","site_admin":false},"repo":{"id":37473171,"name":"dinner_dash","full_name":"morganmiller/dinner_dash","owner":{"login":"morganmiller","id":8868319,"avatar_url":"https://avatars.githubusercontent.com/u/8868319?v=3","gravatar_id":"","url":"https://api.github.com/users/morganmiller","html_url":"https://github.com/morganmiller","followers_url":"https://api.github.com/users/morganmiller/followers","following_url":"https://api.github.com/users/morganmiller/following{/other_user}","gists_url":"https://api.github.com/users/morganmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/morganmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganmiller/subscriptions","organizations_url":"https://api.github.com/users/morganmiller/orgs","repos_url":"https://api.github.com/users/morganmiller/repos","events_url":"https://api.github.com/users/morganmiller/events{/privacy}","received_events_url":"https://api.github.com/users/morganmiller/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morganmiller/dinner_dash","description":"","fork":false,"url":"https://api.github.com/repos/morganmiller/dinner_dash","forks_url":"https://api.github.com/repos/morganmiller/dinner_dash/forks","keys_url":"https://api.github.com/repos/morganmiller/dinner_dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morganmiller/dinner_dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morganmiller/dinner_dash/teams","hooks_url":"https://api.github.com/repos/morganmiller/dinner_dash/hooks","issue_events_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/events{/number}","events_url":"https://api.github.com/repos/morganmiller/dinner_dash/events","assignees_url":"https://api.github.com/repos/morganmiller/dinner_dash/assignees{/user}","branches_url":"https://api.github.com/repos/morganmiller/dinner_dash/branches{/branch}","tags_url":"https://api.github.com/repos/morganmiller/dinner_dash/tags","blobs_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morganmiller/dinner_dash/statuses/{sha}","languages_url":"https://api.github.com/repos/morganmiller/dinner_dash/languages","stargazers_url":"https://api.github.com/repos/morganmiller/dinner_dash/stargazers","contributors_url":"https://api.github.com/repos/morganmiller/dinner_dash/contributors","subscribers_url":"https://api.github.com/repos/morganmiller/dinner_dash/subscribers","subscription_url":"https://api.github.com/repos/morganmiller/dinner_dash/subscription","commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/morganmiller/dinner_dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/morganmiller/dinner_dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues/comments{/number}","contents_url":"https://api.github.com/repos/morganmiller/dinner_dash/contents/{+path}","compare_url":"https://api.github.com/repos/morganmiller/dinner_dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morganmiller/dinner_dash/merges","archive_url":"https://api.github.com/repos/morganmiller/dinner_dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morganmiller/dinner_dash/downloads","issues_url":"https://api.github.com/repos/morganmiller/dinner_dash/issues{/number}","pulls_url":"https://api.github.com/repos/morganmiller/dinner_dash/pulls{/number}","milestones_url":"https://api.github.com/repos/morganmiller/dinner_dash/milestones{/number}","notifications_url":"https://api.github.com/repos/morganmiller/dinner_dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morganmiller/dinner_dash/labels{/name}","releases_url":"https://api.github.com/repos/morganmiller/dinner_dash/releases{/id}","created_at":"2015-06-15T15:18:40Z","updated_at":"2015-06-18T22:35:22Z","pushed_at":"2015-06-20T21:26:36Z","git_url":"git://github.com/morganmiller/dinner_dash.git","ssh_url":"git@github.com:morganmiller/dinner_dash.git","clone_url":"https://github.com/morganmiller/dinner_dash.git","svn_url":"https://github.com/morganmiller/dinner_dash","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/48"},"html":{"href":"https://github.com/morganmiller/dinner_dash/pull/48"},"issue":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/issues/48"},"comments":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/morganmiller/dinner_dash/statuses/c3213fba8f6f1171206cdde46776488001df42fc"}}}}