{"action":"created","comment":{"url":"https://api.github.com/repos/illhhd/umbre/pulls/comments/232439592","pull_request_review_id":173647689,"id":232439592,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjQzOTU5Mg==","diff_hunk":"@@ -19,4 +19,21 @@ class Facility < ApplicationRecord\n   has_many :industry_facilities\n   has_many :industries, through: :industry_facilities\n   has_many :reviews\n+\n+  def self.avarage_satisfaction(reviews)","path":"app/models/facility.rb","position":5,"original_position":5,"commit_id":"c4bf116075fefb1caaa96b9f92a15b2b4a33ca47","original_commit_id":"c4bf116075fefb1caaa96b9f92a15b2b4a33ca47","user":{"login":"illhhd","id":12382345,"node_id":"MDQ6VXNlcjEyMzgyMzQ1","avatar_url":"https://avatars3.githubusercontent.com/u/12382345?v=4","gravatar_id":"","url":"https://api.github.com/users/illhhd","html_url":"https://github.com/illhhd","followers_url":"https://api.github.com/users/illhhd/followers","following_url":"https://api.github.com/users/illhhd/following{/other_user}","gists_url":"https://api.github.com/users/illhhd/gists{/gist_id}","starred_url":"https://api.github.com/users/illhhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illhhd/subscriptions","organizations_url":"https://api.github.com/users/illhhd/orgs","repos_url":"https://api.github.com/users/illhhd/repos","events_url":"https://api.github.com/users/illhhd/events{/privacy}","received_events_url":"https://api.github.com/users/illhhd/received_events","type":"User","site_admin":false},"body":"railsのActiveRecordの機能にある `average` を利用しなかったのは何か理由があったのでしょうか？","created_at":"2018-11-10T03:17:06Z","updated_at":"2018-11-10T03:30:29Z","html_url":"https://github.com/illhhd/umbre/pull/15#discussion_r232439592","pull_request_url":"https://api.github.com/repos/illhhd/umbre/pulls/15","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/illhhd/umbre/pulls/comments/232439592"},"html":{"href":"https://github.com/illhhd/umbre/pull/15#discussion_r232439592"},"pull_request":{"href":"https://api.github.com/repos/illhhd/umbre/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/illhhd/umbre/pulls/15","id":228163399,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MTYzMzk5","html_url":"https://github.com/illhhd/umbre/pull/15","diff_url":"https://github.com/illhhd/umbre/pull/15.diff","patch_url":"https://github.com/illhhd/umbre/pull/15.patch","issue_url":"https://api.github.com/repos/illhhd/umbre/issues/15","number":15,"state":"open","locked":false,"title":"Feature/satisfaction calc","user":{"login":"inkchi","id":1900754,"node_id":"MDQ6VXNlcjE5MDA3NTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1900754?v=4","gravatar_id":"","url":"https://api.github.com/users/inkchi","html_url":"https://github.com/inkchi","followers_url":"https://api.github.com/users/inkchi/followers","following_url":"https://api.github.com/users/inkchi/following{/other_user}","gists_url":"https://api.github.com/users/inkchi/gists{/gist_id}","starred_url":"https://api.github.com/users/inkchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inkchi/subscriptions","organizations_url":"https://api.github.com/users/inkchi/orgs","repos_url":"https://api.github.com/users/inkchi/repos","events_url":"https://api.github.com/users/inkchi/events{/privacy}","received_events_url":"https://api.github.com/users/inkchi/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-04T09:07:50Z","updated_at":"2018-11-10T03:30:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3fd43b1dc4f93adcaf32d795d6d18a87b18beec0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/illhhd/umbre/pulls/15/commits","review_comments_url":"https://api.github.com/repos/illhhd/umbre/pulls/15/comments","review_comment_url":"https://api.github.com/repos/illhhd/umbre/pulls/comments{/number}","comments_url":"https://api.github.com/repos/illhhd/umbre/issues/15/comments","statuses_url":"https://api.github.com/repos/illhhd/umbre/statuses/c4bf116075fefb1caaa96b9f92a15b2b4a33ca47","head":{"label":"illhhd:feature/satisfaction_calc","ref":"feature/satisfaction_calc","sha":"c4bf116075fefb1caaa96b9f92a15b2b4a33ca47","user":{"login":"illhhd","id":12382345,"node_id":"MDQ6VXNlcjEyMzgyMzQ1","avatar_url":"https://avatars3.githubusercontent.com/u/12382345?v=4","gravatar_id":"","url":"https://api.github.com/users/illhhd","html_url":"https://github.com/illhhd","followers_url":"https://api.github.com/users/illhhd/followers","following_url":"https://api.github.com/users/illhhd/following{/other_user}","gists_url":"https://api.github.com/users/illhhd/gists{/gist_id}","starred_url":"https://api.github.com/users/illhhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illhhd/subscriptions","organizations_url":"https://api.github.com/users/illhhd/orgs","repos_url":"https://api.github.com/users/illhhd/repos","events_url":"https://api.github.com/users/illhhd/events{/privacy}","received_events_url":"https://api.github.com/users/illhhd/received_events","type":"User","site_admin":false},"repo":{"id":136951972,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY5NTE5NzI=","name":"umbre","full_name":"illhhd/umbre","private":false,"owner":{"login":"illhhd","id":12382345,"node_id":"MDQ6VXNlcjEyMzgyMzQ1","avatar_url":"https://avatars3.githubusercontent.com/u/12382345?v=4","gravatar_id":"","url":"https://api.github.com/users/illhhd","html_url":"https://github.com/illhhd","followers_url":"https://api.github.com/users/illhhd/followers","following_url":"https://api.github.com/users/illhhd/following{/other_user}","gists_url":"https://api.github.com/users/illhhd/gists{/gist_id}","starred_url":"https://api.github.com/users/illhhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illhhd/subscriptions","organizations_url":"https://api.github.com/users/illhhd/orgs","repos_url":"https://api.github.com/users/illhhd/repos","events_url":"https://api.github.com/users/illhhd/events{/privacy}","received_events_url":"https://api.github.com/users/illhhd/received_events","type":"User","site_admin":false},"html_url":"https://github.com/illhhd/umbre","description":null,"fork":false,"url":"https://api.github.com/repos/illhhd/umbre","forks_url":"https://api.github.com/repos/illhhd/umbre/forks","keys_url":"https://api.github.com/repos/illhhd/umbre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/illhhd/umbre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/illhhd/umbre/teams","hooks_url":"https://api.github.com/repos/illhhd/umbre/hooks","issue_events_url":"https://api.github.com/repos/illhhd/umbre/issues/events{/number}","events_url":"https://api.github.com/repos/illhhd/umbre/events","assignees_url":"https://api.github.com/repos/illhhd/umbre/assignees{/user}","branches_url":"https://api.github.com/repos/illhhd/umbre/branches{/branch}","tags_url":"https://api.github.com/repos/illhhd/umbre/tags","blobs_url":"https://api.github.com/repos/illhhd/umbre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/illhhd/umbre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/illhhd/umbre/git/refs{/sha}","trees_url":"https://api.github.com/repos/illhhd/umbre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/illhhd/umbre/statuses/{sha}","languages_url":"https://api.github.com/repos/illhhd/umbre/languages","stargazers_url":"https://api.github.com/repos/illhhd/umbre/stargazers","contributors_url":"https://api.github.com/repos/illhhd/umbre/contributors","subscribers_url":"https://api.github.com/repos/illhhd/umbre/subscribers","subscription_url":"https://api.github.com/repos/illhhd/umbre/subscription","commits_url":"https://api.github.com/repos/illhhd/umbre/commits{/sha}","git_commits_url":"https://api.github.com/repos/illhhd/umbre/git/commits{/sha}","comments_url":"https://api.github.com/repos/illhhd/umbre/comments{/number}","issue_comment_url":"https://api.github.com/repos/illhhd/umbre/issues/comments{/number}","contents_url":"https://api.github.com/repos/illhhd/umbre/contents/{+path}","compare_url":"https://api.github.com/repos/illhhd/umbre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/illhhd/umbre/merges","archive_url":"https://api.github.com/repos/illhhd/umbre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/illhhd/umbre/downloads","issues_url":"https://api.github.com/repos/illhhd/umbre/issues{/number}","pulls_url":"https://api.github.com/repos/illhhd/umbre/pulls{/number}","milestones_url":"https://api.github.com/repos/illhhd/umbre/milestones{/number}","notifications_url":"https://api.github.com/repos/illhhd/umbre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/illhhd/umbre/labels{/name}","releases_url":"https://api.github.com/repos/illhhd/umbre/releases{/id}","deployments_url":"https://api.github.com/repos/illhhd/umbre/deployments","created_at":"2018-06-11T16:22:07Z","updated_at":"2018-11-04T05:59:15Z","pushed_at":"2018-11-05T17:24:01Z","git_url":"git://github.com/illhhd/umbre.git","ssh_url":"git@github.com:illhhd/umbre.git","clone_url":"https://github.com/illhhd/umbre.git","svn_url":"https://github.com/illhhd/umbre","homepage":null,"size":952,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":1,"default_branch":"develop"}},"base":{"label":"illhhd:develop","ref":"develop","sha":"fb97fa3e4fef0f3c86ee3b0229b6614e16dbe150","user":{"login":"illhhd","id":12382345,"node_id":"MDQ6VXNlcjEyMzgyMzQ1","avatar_url":"https://avatars3.githubusercontent.com/u/12382345?v=4","gravatar_id":"","url":"https://api.github.com/users/illhhd","html_url":"https://github.com/illhhd","followers_url":"https://api.github.com/users/illhhd/followers","following_url":"https://api.github.com/users/illhhd/following{/other_user}","gists_url":"https://api.github.com/users/illhhd/gists{/gist_id}","starred_url":"https://api.github.com/users/illhhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illhhd/subscriptions","organizations_url":"https://api.github.com/users/illhhd/orgs","repos_url":"https://api.github.com/users/illhhd/repos","events_url":"https://api.github.com/users/illhhd/events{/privacy}","received_events_url":"https://api.github.com/users/illhhd/received_events","type":"User","site_admin":false},"repo":{"id":136951972,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY5NTE5NzI=","name":"umbre","full_name":"illhhd/umbre","private":false,"owner":{"login":"illhhd","id":12382345,"node_id":"MDQ6VXNlcjEyMzgyMzQ1","avatar_url":"https://avatars3.githubusercontent.com/u/12382345?v=4","gravatar_id":"","url":"https://api.github.com/users/illhhd","html_url":"https://github.com/illhhd","followers_url":"https://api.github.com/users/illhhd/followers","following_url":"https://api.github.com/users/illhhd/following{/other_user}","gists_url":"https://api.github.com/users/illhhd/gists{/gist_id}","starred_url":"https://api.github.com/users/illhhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illhhd/subscriptions","organizations_url":"https://api.github.com/users/illhhd/orgs","repos_url":"https://api.github.com/users/illhhd/repos","events_url":"https://api.github.com/users/illhhd/events{/privacy}","received_events_url":"https://api.github.com/users/illhhd/received_events","type":"User","site_admin":false},"html_url":"https://github.com/illhhd/umbre","description":null,"fork":false,"url":"https://api.github.com/repos/illhhd/umbre","forks_url":"https://api.github.com/repos/illhhd/umbre/forks","keys_url":"https://api.github.com/repos/illhhd/umbre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/illhhd/umbre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/illhhd/umbre/teams","hooks_url":"https://api.github.com/repos/illhhd/umbre/hooks","issue_events_url":"https://api.github.com/repos/illhhd/umbre/issues/events{/number}","events_url":"https://api.github.com/repos/illhhd/umbre/events","assignees_url":"https://api.github.com/repos/illhhd/umbre/assignees{/user}","branches_url":"https://api.github.com/repos/illhhd/umbre/branches{/branch}","tags_url":"https://api.github.com/repos/illhhd/umbre/tags","blobs_url":"https://api.github.com/repos/illhhd/umbre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/illhhd/umbre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/illhhd/umbre/git/refs{/sha}","trees_url":"https://api.github.com/repos/illhhd/umbre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/illhhd/umbre/statuses/{sha}","languages_url":"https://api.github.com/repos/illhhd/umbre/languages","stargazers_url":"https://api.github.com/repos/illhhd/umbre/stargazers","contributors_url":"https://api.github.com/repos/illhhd/umbre/contributors","subscribers_url":"https://api.github.com/repos/illhhd/umbre/subscribers","subscription_url":"https://api.github.com/repos/illhhd/umbre/subscription","commits_url":"https://api.github.com/repos/illhhd/umbre/commits{/sha}","git_commits_url":"https://api.github.com/repos/illhhd/umbre/git/commits{/sha}","comments_url":"https://api.github.com/repos/illhhd/umbre/comments{/number}","issue_comment_url":"https://api.github.com/repos/illhhd/umbre/issues/comments{/number}","contents_url":"https://api.github.com/repos/illhhd/umbre/contents/{+path}","compare_url":"https://api.github.com/repos/illhhd/umbre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/illhhd/umbre/merges","archive_url":"https://api.github.com/repos/illhhd/umbre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/illhhd/umbre/downloads","issues_url":"https://api.github.com/repos/illhhd/umbre/issues{/number}","pulls_url":"https://api.github.com/repos/illhhd/umbre/pulls{/number}","milestones_url":"https://api.github.com/repos/illhhd/umbre/milestones{/number}","notifications_url":"https://api.github.com/repos/illhhd/umbre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/illhhd/umbre/labels{/name}","releases_url":"https://api.github.com/repos/illhhd/umbre/releases{/id}","deployments_url":"https://api.github.com/repos/illhhd/umbre/deployments","created_at":"2018-06-11T16:22:07Z","updated_at":"2018-11-04T05:59:15Z","pushed_at":"2018-11-05T17:24:01Z","git_url":"git://github.com/illhhd/umbre.git","ssh_url":"git@github.com:illhhd/umbre.git","clone_url":"https://github.com/illhhd/umbre.git","svn_url":"https://github.com/illhhd/umbre","homepage":null,"size":952,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/illhhd/umbre/pulls/15"},"html":{"href":"https://github.com/illhhd/umbre/pull/15"},"issue":{"href":"https://api.github.com/repos/illhhd/umbre/issues/15"},"comments":{"href":"https://api.github.com/repos/illhhd/umbre/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/illhhd/umbre/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/illhhd/umbre/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/illhhd/umbre/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/illhhd/umbre/statuses/c4bf116075fefb1caaa96b9f92a15b2b4a33ca47"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"illhhd"}}