{"action":"created","comment":{"url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/comments/93673338","pull_request_review_id":14206472,"id":93673338,"diff_hunk":"@@ -16,7 +16,7 @@ def authorized_for_delete?\n \n   def self.add_volunteer_to_region volunteer, region\n     return false if volunteer.new_record?\n-    if Assignment.where(:volunteer_id=>volunteer, :region_id=>region.id).count==0\n+    if Assignment.where(volunteer_id: volunteer, region_id: region.id).count == 0","path":"app/models/assignment.rb","position":5,"original_position":5,"commit_id":"f2b6d59364999aca2797aee650769fd739439402","original_commit_id":"f2b6d59364999aca2797aee650769fd739439402","user":{"login":"cllns","id":632942,"avatar_url":"https://avatars.githubusercontent.com/u/632942?v=3","gravatar_id":"","url":"https://api.github.com/users/cllns","html_url":"https://github.com/cllns","followers_url":"https://api.github.com/users/cllns/followers","following_url":"https://api.github.com/users/cllns/following{/other_user}","gists_url":"https://api.github.com/users/cllns/gists{/gist_id}","starred_url":"https://api.github.com/users/cllns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cllns/subscriptions","organizations_url":"https://api.github.com/users/cllns/orgs","repos_url":"https://api.github.com/users/cllns/repos","events_url":"https://api.github.com/users/cllns/events{/privacy}","received_events_url":"https://api.github.com/users/cllns/received_events","type":"User","site_admin":false},"body":"`Region.where(...).empty?` does `COUNT()` too :). \r\n\r\nit's \\~magical\\~ 🔮 \r\n\r\n```\r\n[1] pry(main)> Region.where('id < ?', 100).empty?\r\n   (0.6ms)  SELECT COUNT(*) FROM \"regions\" WHERE (id < 100)\r\n=> false\r\n```\r\n","created_at":"2016-12-22T18:27:56Z","updated_at":"2016-12-22T18:27:57Z","html_url":"https://github.com/boulder-food-rescue/food-rescue-robot/pull/32#discussion_r93673338","pull_request_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/comments/93673338"},"html":{"href":"https://github.com/boulder-food-rescue/food-rescue-robot/pull/32#discussion_r93673338"},"pull_request":{"href":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/32","id":96350040,"html_url":"https://github.com/boulder-food-rescue/food-rescue-robot/pull/32","diff_url":"https://github.com/boulder-food-rescue/food-rescue-robot/pull/32.diff","patch_url":"https://github.com/boulder-food-rescue/food-rescue-robot/pull/32.patch","issue_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues/32","number":32,"state":"open","locked":false,"title":"Added more detailed specs for VolunteersController#assign","user":{"login":"TimothyClayton","id":1821123,"avatar_url":"https://avatars.githubusercontent.com/u/1821123?v=3","gravatar_id":"","url":"https://api.github.com/users/TimothyClayton","html_url":"https://github.com/TimothyClayton","followers_url":"https://api.github.com/users/TimothyClayton/followers","following_url":"https://api.github.com/users/TimothyClayton/following{/other_user}","gists_url":"https://api.github.com/users/TimothyClayton/gists{/gist_id}","starred_url":"https://api.github.com/users/TimothyClayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimothyClayton/subscriptions","organizations_url":"https://api.github.com/users/TimothyClayton/orgs","repos_url":"https://api.github.com/users/TimothyClayton/repos","events_url":"https://api.github.com/users/TimothyClayton/events{/privacy}","received_events_url":"https://api.github.com/users/TimothyClayton/received_events","type":"User","site_admin":false},"body":"## Overview\r\nFills out `#assign` action specs for VolunteersController","created_at":"2016-12-02T20:47:10Z","updated_at":"2016-12-22T18:27:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1cb263a6f2103b99517c2ab08bbbfa6b90c59cd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/32/commits","review_comments_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/32/comments","review_comment_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues/32/comments","statuses_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/statuses/f2b6d59364999aca2797aee650769fd739439402","head":{"label":"boulder-food-rescue:volunteers_controller_spec","ref":"volunteers_controller_spec","sha":"f2b6d59364999aca2797aee650769fd739439402","user":{"login":"boulder-food-rescue","id":18725077,"avatar_url":"https://avatars.githubusercontent.com/u/18725077?v=3","gravatar_id":"","url":"https://api.github.com/users/boulder-food-rescue","html_url":"https://github.com/boulder-food-rescue","followers_url":"https://api.github.com/users/boulder-food-rescue/followers","following_url":"https://api.github.com/users/boulder-food-rescue/following{/other_user}","gists_url":"https://api.github.com/users/boulder-food-rescue/gists{/gist_id}","starred_url":"https://api.github.com/users/boulder-food-rescue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boulder-food-rescue/subscriptions","organizations_url":"https://api.github.com/users/boulder-food-rescue/orgs","repos_url":"https://api.github.com/users/boulder-food-rescue/repos","events_url":"https://api.github.com/users/boulder-food-rescue/events{/privacy}","received_events_url":"https://api.github.com/users/boulder-food-rescue/received_events","type":"Organization","site_admin":false},"repo":{"id":9252256,"name":"food-rescue-robot","full_name":"boulder-food-rescue/food-rescue-robot","owner":{"login":"boulder-food-rescue","id":18725077,"avatar_url":"https://avatars.githubusercontent.com/u/18725077?v=3","gravatar_id":"","url":"https://api.github.com/users/boulder-food-rescue","html_url":"https://github.com/boulder-food-rescue","followers_url":"https://api.github.com/users/boulder-food-rescue/followers","following_url":"https://api.github.com/users/boulder-food-rescue/following{/other_user}","gists_url":"https://api.github.com/users/boulder-food-rescue/gists{/gist_id}","starred_url":"https://api.github.com/users/boulder-food-rescue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boulder-food-rescue/subscriptions","organizations_url":"https://api.github.com/users/boulder-food-rescue/orgs","repos_url":"https://api.github.com/users/boulder-food-rescue/repos","events_url":"https://api.github.com/users/boulder-food-rescue/events{/privacy}","received_events_url":"https://api.github.com/users/boulder-food-rescue/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/boulder-food-rescue/food-rescue-robot","description":"A Rails App for Managing \"Just in Time\" Food Rescue, Developed by/for Boulder Food Rescue in Boulder, CO, USA","fork":false,"url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot","forks_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/forks","keys_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/teams","hooks_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/hooks","issue_events_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues/events{/number}","events_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/events","assignees_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/assignees{/user}","branches_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/branches{/branch}","tags_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/tags","blobs_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/refs{/sha}","trees_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/statuses/{sha}","languages_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/languages","stargazers_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/stargazers","contributors_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/contributors","subscribers_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/subscribers","subscription_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/subscription","commits_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/commits{/sha}","git_commits_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/commits{/sha}","comments_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/comments{/number}","issue_comment_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues/comments{/number}","contents_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/contents/{+path}","compare_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/merges","archive_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/downloads","issues_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues{/number}","pulls_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls{/number}","milestones_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/milestones{/number}","notifications_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/labels{/name}","releases_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/releases{/id}","deployments_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/deployments","created_at":"2013-04-05T22:52:49Z","updated_at":"2016-11-02T14:20:05Z","pushed_at":"2016-12-22T16:22:02Z","git_url":"git://github.com/boulder-food-rescue/food-rescue-robot.git","ssh_url":"git@github.com:boulder-food-rescue/food-rescue-robot.git","clone_url":"https://github.com/boulder-food-rescue/food-rescue-robot.git","svn_url":"https://github.com/boulder-food-rescue/food-rescue-robot","homepage":"","size":4775,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":6,"forks":29,"open_issues":6,"watchers":13,"default_branch":"master"}},"base":{"label":"boulder-food-rescue:master","ref":"master","sha":"f14c831813dd69fc57c0fdc71cc8826e862f11d1","user":{"login":"boulder-food-rescue","id":18725077,"avatar_url":"https://avatars.githubusercontent.com/u/18725077?v=3","gravatar_id":"","url":"https://api.github.com/users/boulder-food-rescue","html_url":"https://github.com/boulder-food-rescue","followers_url":"https://api.github.com/users/boulder-food-rescue/followers","following_url":"https://api.github.com/users/boulder-food-rescue/following{/other_user}","gists_url":"https://api.github.com/users/boulder-food-rescue/gists{/gist_id}","starred_url":"https://api.github.com/users/boulder-food-rescue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boulder-food-rescue/subscriptions","organizations_url":"https://api.github.com/users/boulder-food-rescue/orgs","repos_url":"https://api.github.com/users/boulder-food-rescue/repos","events_url":"https://api.github.com/users/boulder-food-rescue/events{/privacy}","received_events_url":"https://api.github.com/users/boulder-food-rescue/received_events","type":"Organization","site_admin":false},"repo":{"id":9252256,"name":"food-rescue-robot","full_name":"boulder-food-rescue/food-rescue-robot","owner":{"login":"boulder-food-rescue","id":18725077,"avatar_url":"https://avatars.githubusercontent.com/u/18725077?v=3","gravatar_id":"","url":"https://api.github.com/users/boulder-food-rescue","html_url":"https://github.com/boulder-food-rescue","followers_url":"https://api.github.com/users/boulder-food-rescue/followers","following_url":"https://api.github.com/users/boulder-food-rescue/following{/other_user}","gists_url":"https://api.github.com/users/boulder-food-rescue/gists{/gist_id}","starred_url":"https://api.github.com/users/boulder-food-rescue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boulder-food-rescue/subscriptions","organizations_url":"https://api.github.com/users/boulder-food-rescue/orgs","repos_url":"https://api.github.com/users/boulder-food-rescue/repos","events_url":"https://api.github.com/users/boulder-food-rescue/events{/privacy}","received_events_url":"https://api.github.com/users/boulder-food-rescue/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/boulder-food-rescue/food-rescue-robot","description":"A Rails App for Managing \"Just in Time\" Food Rescue, Developed by/for Boulder Food Rescue in Boulder, CO, USA","fork":false,"url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot","forks_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/forks","keys_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/teams","hooks_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/hooks","issue_events_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues/events{/number}","events_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/events","assignees_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/assignees{/user}","branches_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/branches{/branch}","tags_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/tags","blobs_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/refs{/sha}","trees_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/statuses/{sha}","languages_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/languages","stargazers_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/stargazers","contributors_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/contributors","subscribers_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/subscribers","subscription_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/subscription","commits_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/commits{/sha}","git_commits_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/git/commits{/sha}","comments_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/comments{/number}","issue_comment_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues/comments{/number}","contents_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/contents/{+path}","compare_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/merges","archive_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/downloads","issues_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues{/number}","pulls_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls{/number}","milestones_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/milestones{/number}","notifications_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/labels{/name}","releases_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/releases{/id}","deployments_url":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/deployments","created_at":"2013-04-05T22:52:49Z","updated_at":"2016-11-02T14:20:05Z","pushed_at":"2016-12-22T16:22:02Z","git_url":"git://github.com/boulder-food-rescue/food-rescue-robot.git","ssh_url":"git@github.com:boulder-food-rescue/food-rescue-robot.git","clone_url":"https://github.com/boulder-food-rescue/food-rescue-robot.git","svn_url":"https://github.com/boulder-food-rescue/food-rescue-robot","homepage":"","size":4775,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":6,"forks":29,"open_issues":6,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/32"},"html":{"href":"https://github.com/boulder-food-rescue/food-rescue-robot/pull/32"},"issue":{"href":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues/32"},"comments":{"href":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/boulder-food-rescue/food-rescue-robot/statuses/f2b6d59364999aca2797aee650769fd739439402"}}}}
{"actor":{"display_login":"cllns"}}