{"action":"created","comment":{"url":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/comments/43616647","id":43616647,"diff_hunk":"@@ -1,7 +1,35 @@\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+require 'faker'\n+\n+#Create users\n+10.times do\n+  User.create!(\n+    name: Faker::Name.name,\n+    email: Faker::Internet.email,\n+    password: 'helloworld'\n+    )\n+end\n+users = User.all\n+\n+levels = ['public', 'private']\n+\n+100.times do\n+  Wiki.create!(\n+    subject: Faker::Lorem.sentence,\n+    level: levels.sample,\n+    body: Faker::Lorem.paragraph,\n+    user: users.sample\n+  )\n+end\n+wikis = Wiki.all\n+\n+50.times do\n+  Collaboration.create!(\n+    user: users.sample,\n+    wiki: wikis.sample\n+  )\n+end","path":"db/seeds.rb","position":37,"original_position":37,"commit_id":"fe0285e8f398f4aa542bb1e851cce76301004e46","original_commit_id":"fe0285e8f398f4aa542bb1e851cce76301004e46","user":{"login":"eliotsykes","id":31698,"avatar_url":"https://avatars.githubusercontent.com/u/31698?v=3","gravatar_id":"","url":"https://api.github.com/users/eliotsykes","html_url":"https://github.com/eliotsykes","followers_url":"https://api.github.com/users/eliotsykes/followers","following_url":"https://api.github.com/users/eliotsykes/following{/other_user}","gists_url":"https://api.github.com/users/eliotsykes/gists{/gist_id}","starred_url":"https://api.github.com/users/eliotsykes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliotsykes/subscriptions","organizations_url":"https://api.github.com/users/eliotsykes/orgs","repos_url":"https://api.github.com/users/eliotsykes/repos","events_url":"https://api.github.com/users/eliotsykes/events{/privacy}","received_events_url":"https://api.github.com/users/eliotsykes/received_events","type":"User","site_admin":false},"body":"Not a major problem, lines 25-30 could be creating duplicate collaborations. See previous comment on the multi-column unique index. The unique index would cause the db to prevent duplicate collaborations from being added.","created_at":"2015-11-02T10:58:19Z","updated_at":"2015-11-02T10:58:19Z","html_url":"https://github.com/HelenaWu/Blocipedia/pull/1#discussion_r43616647","pull_request_url":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/comments/43616647"},"html":{"href":"https://github.com/HelenaWu/Blocipedia/pull/1#discussion_r43616647"},"pull_request":{"href":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/1","id":49387279,"html_url":"https://github.com/HelenaWu/Blocipedia/pull/1","diff_url":"https://github.com/HelenaWu/Blocipedia/pull/1.diff","patch_url":"https://github.com/HelenaWu/Blocipedia/pull/1.patch","issue_url":"https://api.github.com/repos/HelenaWu/Blocipedia/issues/1","number":1,"state":"open","locked":false,"title":"added production url fix, added collaboration HMT relationship, markdown enabled","user":{"login":"HelenaWu","id":1403406,"avatar_url":"https://avatars.githubusercontent.com/u/1403406?v=3","gravatar_id":"","url":"https://api.github.com/users/HelenaWu","html_url":"https://github.com/HelenaWu","followers_url":"https://api.github.com/users/HelenaWu/followers","following_url":"https://api.github.com/users/HelenaWu/following{/other_user}","gists_url":"https://api.github.com/users/HelenaWu/gists{/gist_id}","starred_url":"https://api.github.com/users/HelenaWu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelenaWu/subscriptions","organizations_url":"https://api.github.com/users/HelenaWu/orgs","repos_url":"https://api.github.com/users/HelenaWu/repos","events_url":"https://api.github.com/users/HelenaWu/events{/privacy}","received_events_url":"https://api.github.com/users/HelenaWu/received_events","type":"User","site_admin":false},"body":"Hi Eliot,  \r\n  Hope things are well, after spending a lot of time reading through the bloc tutorial on has many through models, but still struggling to insert the data into the joint table in the edit wiki page. Thank you for your help and see you tomorrow!  \r\n\r\nbest,  \r\nHelena","created_at":"2015-11-02T01:22:47Z","updated_at":"2015-11-02T10:58:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27c8de38117effeac09e1abb1cde95dd2be15dd0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/1/commits","review_comments_url":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/1/comments","review_comment_url":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HelenaWu/Blocipedia/issues/1/comments","statuses_url":"https://api.github.com/repos/HelenaWu/Blocipedia/statuses/fe0285e8f398f4aa542bb1e851cce76301004e46","head":{"label":"HelenaWu:add_collabs","ref":"add_collabs","sha":"fe0285e8f398f4aa542bb1e851cce76301004e46","user":{"login":"HelenaWu","id":1403406,"avatar_url":"https://avatars.githubusercontent.com/u/1403406?v=3","gravatar_id":"","url":"https://api.github.com/users/HelenaWu","html_url":"https://github.com/HelenaWu","followers_url":"https://api.github.com/users/HelenaWu/followers","following_url":"https://api.github.com/users/HelenaWu/following{/other_user}","gists_url":"https://api.github.com/users/HelenaWu/gists{/gist_id}","starred_url":"https://api.github.com/users/HelenaWu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelenaWu/subscriptions","organizations_url":"https://api.github.com/users/HelenaWu/orgs","repos_url":"https://api.github.com/users/HelenaWu/repos","events_url":"https://api.github.com/users/HelenaWu/events{/privacy}","received_events_url":"https://api.github.com/users/HelenaWu/received_events","type":"User","site_admin":false},"repo":{"id":44492793,"name":"Blocipedia","full_name":"HelenaWu/Blocipedia","owner":{"login":"HelenaWu","id":1403406,"avatar_url":"https://avatars.githubusercontent.com/u/1403406?v=3","gravatar_id":"","url":"https://api.github.com/users/HelenaWu","html_url":"https://github.com/HelenaWu","followers_url":"https://api.github.com/users/HelenaWu/followers","following_url":"https://api.github.com/users/HelenaWu/following{/other_user}","gists_url":"https://api.github.com/users/HelenaWu/gists{/gist_id}","starred_url":"https://api.github.com/users/HelenaWu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelenaWu/subscriptions","organizations_url":"https://api.github.com/users/HelenaWu/orgs","repos_url":"https://api.github.com/users/HelenaWu/repos","events_url":"https://api.github.com/users/HelenaWu/events{/privacy}","received_events_url":"https://api.github.com/users/HelenaWu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HelenaWu/Blocipedia","description":"","fork":false,"url":"https://api.github.com/repos/HelenaWu/Blocipedia","forks_url":"https://api.github.com/repos/HelenaWu/Blocipedia/forks","keys_url":"https://api.github.com/repos/HelenaWu/Blocipedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HelenaWu/Blocipedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HelenaWu/Blocipedia/teams","hooks_url":"https://api.github.com/repos/HelenaWu/Blocipedia/hooks","issue_events_url":"https://api.github.com/repos/HelenaWu/Blocipedia/issues/events{/number}","events_url":"https://api.github.com/repos/HelenaWu/Blocipedia/events","assignees_url":"https://api.github.com/repos/HelenaWu/Blocipedia/assignees{/user}","branches_url":"https://api.github.com/repos/HelenaWu/Blocipedia/branches{/branch}","tags_url":"https://api.github.com/repos/HelenaWu/Blocipedia/tags","blobs_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HelenaWu/Blocipedia/statuses/{sha}","languages_url":"https://api.github.com/repos/HelenaWu/Blocipedia/languages","stargazers_url":"https://api.github.com/repos/HelenaWu/Blocipedia/stargazers","contributors_url":"https://api.github.com/repos/HelenaWu/Blocipedia/contributors","subscribers_url":"https://api.github.com/repos/HelenaWu/Blocipedia/subscribers","subscription_url":"https://api.github.com/repos/HelenaWu/Blocipedia/subscription","commits_url":"https://api.github.com/repos/HelenaWu/Blocipedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/HelenaWu/Blocipedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/HelenaWu/Blocipedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/HelenaWu/Blocipedia/contents/{+path}","compare_url":"https://api.github.com/repos/HelenaWu/Blocipedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HelenaWu/Blocipedia/merges","archive_url":"https://api.github.com/repos/HelenaWu/Blocipedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HelenaWu/Blocipedia/downloads","issues_url":"https://api.github.com/repos/HelenaWu/Blocipedia/issues{/number}","pulls_url":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls{/number}","milestones_url":"https://api.github.com/repos/HelenaWu/Blocipedia/milestones{/number}","notifications_url":"https://api.github.com/repos/HelenaWu/Blocipedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HelenaWu/Blocipedia/labels{/name}","releases_url":"https://api.github.com/repos/HelenaWu/Blocipedia/releases{/id}","created_at":"2015-10-18T19:27:49Z","updated_at":"2015-10-18T19:29:57Z","pushed_at":"2015-11-02T03:59:01Z","git_url":"git://github.com/HelenaWu/Blocipedia.git","ssh_url":"git@github.com:HelenaWu/Blocipedia.git","clone_url":"https://github.com/HelenaWu/Blocipedia.git","svn_url":"https://github.com/HelenaWu/Blocipedia","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"HelenaWu:master","ref":"master","sha":"7d1c416aac10167fd51167626bfaa7daf826931f","user":{"login":"HelenaWu","id":1403406,"avatar_url":"https://avatars.githubusercontent.com/u/1403406?v=3","gravatar_id":"","url":"https://api.github.com/users/HelenaWu","html_url":"https://github.com/HelenaWu","followers_url":"https://api.github.com/users/HelenaWu/followers","following_url":"https://api.github.com/users/HelenaWu/following{/other_user}","gists_url":"https://api.github.com/users/HelenaWu/gists{/gist_id}","starred_url":"https://api.github.com/users/HelenaWu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelenaWu/subscriptions","organizations_url":"https://api.github.com/users/HelenaWu/orgs","repos_url":"https://api.github.com/users/HelenaWu/repos","events_url":"https://api.github.com/users/HelenaWu/events{/privacy}","received_events_url":"https://api.github.com/users/HelenaWu/received_events","type":"User","site_admin":false},"repo":{"id":44492793,"name":"Blocipedia","full_name":"HelenaWu/Blocipedia","owner":{"login":"HelenaWu","id":1403406,"avatar_url":"https://avatars.githubusercontent.com/u/1403406?v=3","gravatar_id":"","url":"https://api.github.com/users/HelenaWu","html_url":"https://github.com/HelenaWu","followers_url":"https://api.github.com/users/HelenaWu/followers","following_url":"https://api.github.com/users/HelenaWu/following{/other_user}","gists_url":"https://api.github.com/users/HelenaWu/gists{/gist_id}","starred_url":"https://api.github.com/users/HelenaWu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelenaWu/subscriptions","organizations_url":"https://api.github.com/users/HelenaWu/orgs","repos_url":"https://api.github.com/users/HelenaWu/repos","events_url":"https://api.github.com/users/HelenaWu/events{/privacy}","received_events_url":"https://api.github.com/users/HelenaWu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HelenaWu/Blocipedia","description":"","fork":false,"url":"https://api.github.com/repos/HelenaWu/Blocipedia","forks_url":"https://api.github.com/repos/HelenaWu/Blocipedia/forks","keys_url":"https://api.github.com/repos/HelenaWu/Blocipedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HelenaWu/Blocipedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HelenaWu/Blocipedia/teams","hooks_url":"https://api.github.com/repos/HelenaWu/Blocipedia/hooks","issue_events_url":"https://api.github.com/repos/HelenaWu/Blocipedia/issues/events{/number}","events_url":"https://api.github.com/repos/HelenaWu/Blocipedia/events","assignees_url":"https://api.github.com/repos/HelenaWu/Blocipedia/assignees{/user}","branches_url":"https://api.github.com/repos/HelenaWu/Blocipedia/branches{/branch}","tags_url":"https://api.github.com/repos/HelenaWu/Blocipedia/tags","blobs_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HelenaWu/Blocipedia/statuses/{sha}","languages_url":"https://api.github.com/repos/HelenaWu/Blocipedia/languages","stargazers_url":"https://api.github.com/repos/HelenaWu/Blocipedia/stargazers","contributors_url":"https://api.github.com/repos/HelenaWu/Blocipedia/contributors","subscribers_url":"https://api.github.com/repos/HelenaWu/Blocipedia/subscribers","subscription_url":"https://api.github.com/repos/HelenaWu/Blocipedia/subscription","commits_url":"https://api.github.com/repos/HelenaWu/Blocipedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/HelenaWu/Blocipedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/HelenaWu/Blocipedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/HelenaWu/Blocipedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/HelenaWu/Blocipedia/contents/{+path}","compare_url":"https://api.github.com/repos/HelenaWu/Blocipedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HelenaWu/Blocipedia/merges","archive_url":"https://api.github.com/repos/HelenaWu/Blocipedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HelenaWu/Blocipedia/downloads","issues_url":"https://api.github.com/repos/HelenaWu/Blocipedia/issues{/number}","pulls_url":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls{/number}","milestones_url":"https://api.github.com/repos/HelenaWu/Blocipedia/milestones{/number}","notifications_url":"https://api.github.com/repos/HelenaWu/Blocipedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HelenaWu/Blocipedia/labels{/name}","releases_url":"https://api.github.com/repos/HelenaWu/Blocipedia/releases{/id}","created_at":"2015-10-18T19:27:49Z","updated_at":"2015-10-18T19:29:57Z","pushed_at":"2015-11-02T03:59:01Z","git_url":"git://github.com/HelenaWu/Blocipedia.git","ssh_url":"git@github.com:HelenaWu/Blocipedia.git","clone_url":"https://github.com/HelenaWu/Blocipedia.git","svn_url":"https://github.com/HelenaWu/Blocipedia","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/1"},"html":{"href":"https://github.com/HelenaWu/Blocipedia/pull/1"},"issue":{"href":"https://api.github.com/repos/HelenaWu/Blocipedia/issues/1"},"comments":{"href":"https://api.github.com/repos/HelenaWu/Blocipedia/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HelenaWu/Blocipedia/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/HelenaWu/Blocipedia/statuses/fe0285e8f398f4aa542bb1e851cce76301004e46"}}}}