{"action":"created","comment":{"url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/comments/34744474","id":34744474,"diff_hunk":"@@ -0,0 +1,4 @@\n+class Album < ActiveRecord::Base\n+  validates_presence_of :title, :artist, :genre\n+  validates_uniqueness_of :title, scope: :artist","path":"app/models/album.rb","position":3,"original_position":3,"commit_id":"0c1d2021686eae4e6aace8abb931b84026fab583","original_commit_id":"0c1d2021686eae4e6aace8abb931b84026fab583","user":{"login":"rpearce","id":592876,"avatar_url":"https://avatars.githubusercontent.com/u/592876?v=3","gravatar_id":"","url":"https://api.github.com/users/rpearce","html_url":"https://github.com/rpearce","followers_url":"https://api.github.com/users/rpearce/followers","following_url":"https://api.github.com/users/rpearce/following{/other_user}","gists_url":"https://api.github.com/users/rpearce/gists{/gist_id}","starred_url":"https://api.github.com/users/rpearce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpearce/subscriptions","organizations_url":"https://api.github.com/users/rpearce/orgs","repos_url":"https://api.github.com/users/rpearce/repos","events_url":"https://api.github.com/users/rpearce/events{/privacy}","received_events_url":"https://api.github.com/users/rpearce/received_events","type":"User","site_admin":false},"body":"The newer and more accepted way of writing these two methods is like so\r\n```ruby\r\nvalidates :artist, :genre, presence: true\r\nvalidates :title, uniqueness: { scope: :artist }, presence: true\r\n```","created_at":"2015-07-16T00:11:06Z","updated_at":"2015-07-16T00:11:06Z","html_url":"https://github.com/mcmillanator/4.4-CRUD/pull/1#discussion_r34744474","pull_request_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/comments/34744474"},"html":{"href":"https://github.com/mcmillanator/4.4-CRUD/pull/1#discussion_r34744474"},"pull_request":{"href":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/1","id":39762711,"html_url":"https://github.com/mcmillanator/4.4-CRUD/pull/1","diff_url":"https://github.com/mcmillanator/4.4-CRUD/pull/1.diff","patch_url":"https://github.com/mcmillanator/4.4-CRUD/pull/1.patch","issue_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues/1","number":1,"state":"open","locked":false,"title":"CRUD is complete.  Initial tests passed.","user":{"login":"mcmillanator","id":8310830,"avatar_url":"https://avatars.githubusercontent.com/u/8310830?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmillanator","html_url":"https://github.com/mcmillanator","followers_url":"https://api.github.com/users/mcmillanator/followers","following_url":"https://api.github.com/users/mcmillanator/following{/other_user}","gists_url":"https://api.github.com/users/mcmillanator/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmillanator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmillanator/subscriptions","organizations_url":"https://api.github.com/users/mcmillanator/orgs","repos_url":"https://api.github.com/users/mcmillanator/repos","events_url":"https://api.github.com/users/mcmillanator/events{/privacy}","received_events_url":"https://api.github.com/users/mcmillanator/received_events","type":"User","site_admin":false},"body":"![Pink Floyd Music Video] (http://i.imgur.com/cYF38aD.gif)\r\nThis is my first CRUD app in Rails.  I have an album database.  Albums can be Created, Updated, Read, and Destroyed from the web interface.  I have validation in place for insuring none of the database columns will be entered as blank.  I have duplicate validation in place so that the same artist and album cannot be entered more than once.  I have tests for the model.  I am still learning, so I am not sure what else to add to the tests.  As an extra challenge I will begin adding tests for the controller.","created_at":"2015-07-12T14:22:37Z","updated_at":"2015-07-16T00:11:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a61c5b4c58b8ffc55dd1eccd23ea5a264c65aa9f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/1/comments","review_comment_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues/1/comments","statuses_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/statuses/0c1d2021686eae4e6aace8abb931b84026fab583","head":{"label":"mcmillanator:dev","ref":"dev","sha":"0c1d2021686eae4e6aace8abb931b84026fab583","user":{"login":"mcmillanator","id":8310830,"avatar_url":"https://avatars.githubusercontent.com/u/8310830?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmillanator","html_url":"https://github.com/mcmillanator","followers_url":"https://api.github.com/users/mcmillanator/followers","following_url":"https://api.github.com/users/mcmillanator/following{/other_user}","gists_url":"https://api.github.com/users/mcmillanator/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmillanator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmillanator/subscriptions","organizations_url":"https://api.github.com/users/mcmillanator/orgs","repos_url":"https://api.github.com/users/mcmillanator/repos","events_url":"https://api.github.com/users/mcmillanator/events{/privacy}","received_events_url":"https://api.github.com/users/mcmillanator/received_events","type":"User","site_admin":false},"repo":{"id":38933103,"name":"4.4-CRUD","full_name":"mcmillanator/4.4-CRUD","owner":{"login":"mcmillanator","id":8310830,"avatar_url":"https://avatars.githubusercontent.com/u/8310830?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmillanator","html_url":"https://github.com/mcmillanator","followers_url":"https://api.github.com/users/mcmillanator/followers","following_url":"https://api.github.com/users/mcmillanator/following{/other_user}","gists_url":"https://api.github.com/users/mcmillanator/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmillanator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmillanator/subscriptions","organizations_url":"https://api.github.com/users/mcmillanator/orgs","repos_url":"https://api.github.com/users/mcmillanator/repos","events_url":"https://api.github.com/users/mcmillanator/events{/privacy}","received_events_url":"https://api.github.com/users/mcmillanator/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcmillanator/4.4-CRUD","description":null,"fork":false,"url":"https://api.github.com/repos/mcmillanator/4.4-CRUD","forks_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/forks","keys_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/teams","hooks_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/hooks","issue_events_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues/events{/number}","events_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/events","assignees_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/assignees{/user}","branches_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/branches{/branch}","tags_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/tags","blobs_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/statuses/{sha}","languages_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/languages","stargazers_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/stargazers","contributors_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/contributors","subscribers_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/subscribers","subscription_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/subscription","commits_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/contents/{+path}","compare_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/merges","archive_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/downloads","issues_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues{/number}","pulls_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls{/number}","milestones_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/milestones{/number}","notifications_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/labels{/name}","releases_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/releases{/id}","created_at":"2015-07-11T16:48:17Z","updated_at":"2015-07-11T16:49:27Z","pushed_at":"2015-07-13T12:55:39Z","git_url":"git://github.com/mcmillanator/4.4-CRUD.git","ssh_url":"git@github.com:mcmillanator/4.4-CRUD.git","clone_url":"https://github.com/mcmillanator/4.4-CRUD.git","svn_url":"https://github.com/mcmillanator/4.4-CRUD","homepage":null,"size":0,"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":"mcmillanator:master","ref":"master","sha":"cb28de9e17380dcf0f767f3f0df6e1b16fb624a1","user":{"login":"mcmillanator","id":8310830,"avatar_url":"https://avatars.githubusercontent.com/u/8310830?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmillanator","html_url":"https://github.com/mcmillanator","followers_url":"https://api.github.com/users/mcmillanator/followers","following_url":"https://api.github.com/users/mcmillanator/following{/other_user}","gists_url":"https://api.github.com/users/mcmillanator/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmillanator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmillanator/subscriptions","organizations_url":"https://api.github.com/users/mcmillanator/orgs","repos_url":"https://api.github.com/users/mcmillanator/repos","events_url":"https://api.github.com/users/mcmillanator/events{/privacy}","received_events_url":"https://api.github.com/users/mcmillanator/received_events","type":"User","site_admin":false},"repo":{"id":38933103,"name":"4.4-CRUD","full_name":"mcmillanator/4.4-CRUD","owner":{"login":"mcmillanator","id":8310830,"avatar_url":"https://avatars.githubusercontent.com/u/8310830?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmillanator","html_url":"https://github.com/mcmillanator","followers_url":"https://api.github.com/users/mcmillanator/followers","following_url":"https://api.github.com/users/mcmillanator/following{/other_user}","gists_url":"https://api.github.com/users/mcmillanator/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmillanator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmillanator/subscriptions","organizations_url":"https://api.github.com/users/mcmillanator/orgs","repos_url":"https://api.github.com/users/mcmillanator/repos","events_url":"https://api.github.com/users/mcmillanator/events{/privacy}","received_events_url":"https://api.github.com/users/mcmillanator/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcmillanator/4.4-CRUD","description":null,"fork":false,"url":"https://api.github.com/repos/mcmillanator/4.4-CRUD","forks_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/forks","keys_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/teams","hooks_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/hooks","issue_events_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues/events{/number}","events_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/events","assignees_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/assignees{/user}","branches_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/branches{/branch}","tags_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/tags","blobs_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/statuses/{sha}","languages_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/languages","stargazers_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/stargazers","contributors_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/contributors","subscribers_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/subscribers","subscription_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/subscription","commits_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/contents/{+path}","compare_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/merges","archive_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/downloads","issues_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues{/number}","pulls_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls{/number}","milestones_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/milestones{/number}","notifications_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/labels{/name}","releases_url":"https://api.github.com/repos/mcmillanator/4.4-CRUD/releases{/id}","created_at":"2015-07-11T16:48:17Z","updated_at":"2015-07-11T16:49:27Z","pushed_at":"2015-07-13T12:55:39Z","git_url":"git://github.com/mcmillanator/4.4-CRUD.git","ssh_url":"git@github.com:mcmillanator/4.4-CRUD.git","clone_url":"https://github.com/mcmillanator/4.4-CRUD.git","svn_url":"https://github.com/mcmillanator/4.4-CRUD","homepage":null,"size":0,"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/mcmillanator/4.4-CRUD/pulls/1"},"html":{"href":"https://github.com/mcmillanator/4.4-CRUD/pull/1"},"issue":{"href":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues/1"},"comments":{"href":"https://api.github.com/repos/mcmillanator/4.4-CRUD/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mcmillanator/4.4-CRUD/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/mcmillanator/4.4-CRUD/statuses/0c1d2021686eae4e6aace8abb931b84026fab583"}}}}