{"action":"created","comment":{"url":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/comments/31894779","id":31894779,"diff_hunk":"@@ -18,16 +18,24 @@ class Dish < ActiveRecord::Base\n   RATE_DIMENSION_DISH = 'dish'\n   ratyrate_rateable RATE_DIMENSION_DISH\n \n-  def rates\n+  # public activity\n+  include PublicActivity::Model\n+  tracked owner: Proc.new{ |controller, model| controller.try(:current_user) }, recipient: Proc.new{ |controller, model| model.try(:user) } ","path":"app/models/dish.rb","position":7,"original_position":7,"commit_id":"286edb4f6cad7ba994540b6443049498525690fb","original_commit_id":"286edb4f6cad7ba994540b6443049498525690fb","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":"Consider trying to make line 23 clearer on what's happening here. Perhaps the `Proc` logic could be moved to private methods that are well-named.","created_at":"2015-06-08T08:30:20Z","updated_at":"2015-06-08T08:30:20Z","html_url":"https://github.com/xudongcamsys/homefoodie/pull/5#discussion_r31894779","pull_request_url":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/comments/31894779"},"html":{"href":"https://github.com/xudongcamsys/homefoodie/pull/5#discussion_r31894779"},"pull_request":{"href":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/5","id":37109218,"html_url":"https://github.com/xudongcamsys/homefoodie/pull/5","diff_url":"https://github.com/xudongcamsys/homefoodie/pull/5.diff","patch_url":"https://github.com/xudongcamsys/homefoodie/pull/5.patch","issue_url":"https://api.github.com/repos/xudongcamsys/homefoodie/issues/5","number":5,"state":"closed","locked":false,"title":"Public activity","user":{"login":"xudongcamsys","id":6162252,"avatar_url":"https://avatars.githubusercontent.com/u/6162252?v=3","gravatar_id":"","url":"https://api.github.com/users/xudongcamsys","html_url":"https://github.com/xudongcamsys","followers_url":"https://api.github.com/users/xudongcamsys/followers","following_url":"https://api.github.com/users/xudongcamsys/following{/other_user}","gists_url":"https://api.github.com/users/xudongcamsys/gists{/gist_id}","starred_url":"https://api.github.com/users/xudongcamsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xudongcamsys/subscriptions","organizations_url":"https://api.github.com/users/xudongcamsys/orgs","repos_url":"https://api.github.com/users/xudongcamsys/repos","events_url":"https://api.github.com/users/xudongcamsys/events{/privacy}","received_events_url":"https://api.github.com/users/xudongcamsys/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-07T16:24:26Z","updated_at":"2015-06-08T08:30:20Z","closed_at":"2015-06-07T16:31:48Z","merged_at":"2015-06-07T16:31:48Z","merge_commit_sha":"16b562404903048954cefc1a0aa7d6c8aa68f904","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/5/commits","review_comments_url":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/5/comments","review_comment_url":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xudongcamsys/homefoodie/issues/5/comments","statuses_url":"https://api.github.com/repos/xudongcamsys/homefoodie/statuses/286edb4f6cad7ba994540b6443049498525690fb","head":{"label":"xudongcamsys:public_activity","ref":"public_activity","sha":"286edb4f6cad7ba994540b6443049498525690fb","user":{"login":"xudongcamsys","id":6162252,"avatar_url":"https://avatars.githubusercontent.com/u/6162252?v=3","gravatar_id":"","url":"https://api.github.com/users/xudongcamsys","html_url":"https://github.com/xudongcamsys","followers_url":"https://api.github.com/users/xudongcamsys/followers","following_url":"https://api.github.com/users/xudongcamsys/following{/other_user}","gists_url":"https://api.github.com/users/xudongcamsys/gists{/gist_id}","starred_url":"https://api.github.com/users/xudongcamsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xudongcamsys/subscriptions","organizations_url":"https://api.github.com/users/xudongcamsys/orgs","repos_url":"https://api.github.com/users/xudongcamsys/repos","events_url":"https://api.github.com/users/xudongcamsys/events{/privacy}","received_events_url":"https://api.github.com/users/xudongcamsys/received_events","type":"User","site_admin":false},"repo":{"id":34533950,"name":"homefoodie","full_name":"xudongcamsys/homefoodie","owner":{"login":"xudongcamsys","id":6162252,"avatar_url":"https://avatars.githubusercontent.com/u/6162252?v=3","gravatar_id":"","url":"https://api.github.com/users/xudongcamsys","html_url":"https://github.com/xudongcamsys","followers_url":"https://api.github.com/users/xudongcamsys/followers","following_url":"https://api.github.com/users/xudongcamsys/following{/other_user}","gists_url":"https://api.github.com/users/xudongcamsys/gists{/gist_id}","starred_url":"https://api.github.com/users/xudongcamsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xudongcamsys/subscriptions","organizations_url":"https://api.github.com/users/xudongcamsys/orgs","repos_url":"https://api.github.com/users/xudongcamsys/repos","events_url":"https://api.github.com/users/xudongcamsys/events{/privacy}","received_events_url":"https://api.github.com/users/xudongcamsys/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xudongcamsys/homefoodie","description":"A social platform to explore and share home-made delicious food in your neighborhood","fork":false,"url":"https://api.github.com/repos/xudongcamsys/homefoodie","forks_url":"https://api.github.com/repos/xudongcamsys/homefoodie/forks","keys_url":"https://api.github.com/repos/xudongcamsys/homefoodie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xudongcamsys/homefoodie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xudongcamsys/homefoodie/teams","hooks_url":"https://api.github.com/repos/xudongcamsys/homefoodie/hooks","issue_events_url":"https://api.github.com/repos/xudongcamsys/homefoodie/issues/events{/number}","events_url":"https://api.github.com/repos/xudongcamsys/homefoodie/events","assignees_url":"https://api.github.com/repos/xudongcamsys/homefoodie/assignees{/user}","branches_url":"https://api.github.com/repos/xudongcamsys/homefoodie/branches{/branch}","tags_url":"https://api.github.com/repos/xudongcamsys/homefoodie/tags","blobs_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/refs{/sha}","trees_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xudongcamsys/homefoodie/statuses/{sha}","languages_url":"https://api.github.com/repos/xudongcamsys/homefoodie/languages","stargazers_url":"https://api.github.com/repos/xudongcamsys/homefoodie/stargazers","contributors_url":"https://api.github.com/repos/xudongcamsys/homefoodie/contributors","subscribers_url":"https://api.github.com/repos/xudongcamsys/homefoodie/subscribers","subscription_url":"https://api.github.com/repos/xudongcamsys/homefoodie/subscription","commits_url":"https://api.github.com/repos/xudongcamsys/homefoodie/commits{/sha}","git_commits_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/commits{/sha}","comments_url":"https://api.github.com/repos/xudongcamsys/homefoodie/comments{/number}","issue_comment_url":"https://api.github.com/repos/xudongcamsys/homefoodie/issues/comments{/number}","contents_url":"https://api.github.com/repos/xudongcamsys/homefoodie/contents/{+path}","compare_url":"https://api.github.com/repos/xudongcamsys/homefoodie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xudongcamsys/homefoodie/merges","archive_url":"https://api.github.com/repos/xudongcamsys/homefoodie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xudongcamsys/homefoodie/downloads","issues_url":"https://api.github.com/repos/xudongcamsys/homefoodie/issues{/number}","pulls_url":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls{/number}","milestones_url":"https://api.github.com/repos/xudongcamsys/homefoodie/milestones{/number}","notifications_url":"https://api.github.com/repos/xudongcamsys/homefoodie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xudongcamsys/homefoodie/labels{/name}","releases_url":"https://api.github.com/repos/xudongcamsys/homefoodie/releases{/id}","created_at":"2015-04-24T18:08:10Z","updated_at":"2015-05-28T19:28:08Z","pushed_at":"2015-06-07T16:31:48Z","git_url":"git://github.com/xudongcamsys/homefoodie.git","ssh_url":"git@github.com:xudongcamsys/homefoodie.git","clone_url":"https://github.com/xudongcamsys/homefoodie.git","svn_url":"https://github.com/xudongcamsys/homefoodie","homepage":"http://www.homefoodie.io","size":500,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"xudongcamsys:develop","ref":"develop","sha":"ccec5df158fd4f273abb000892fad8f886a32ef3","user":{"login":"xudongcamsys","id":6162252,"avatar_url":"https://avatars.githubusercontent.com/u/6162252?v=3","gravatar_id":"","url":"https://api.github.com/users/xudongcamsys","html_url":"https://github.com/xudongcamsys","followers_url":"https://api.github.com/users/xudongcamsys/followers","following_url":"https://api.github.com/users/xudongcamsys/following{/other_user}","gists_url":"https://api.github.com/users/xudongcamsys/gists{/gist_id}","starred_url":"https://api.github.com/users/xudongcamsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xudongcamsys/subscriptions","organizations_url":"https://api.github.com/users/xudongcamsys/orgs","repos_url":"https://api.github.com/users/xudongcamsys/repos","events_url":"https://api.github.com/users/xudongcamsys/events{/privacy}","received_events_url":"https://api.github.com/users/xudongcamsys/received_events","type":"User","site_admin":false},"repo":{"id":34533950,"name":"homefoodie","full_name":"xudongcamsys/homefoodie","owner":{"login":"xudongcamsys","id":6162252,"avatar_url":"https://avatars.githubusercontent.com/u/6162252?v=3","gravatar_id":"","url":"https://api.github.com/users/xudongcamsys","html_url":"https://github.com/xudongcamsys","followers_url":"https://api.github.com/users/xudongcamsys/followers","following_url":"https://api.github.com/users/xudongcamsys/following{/other_user}","gists_url":"https://api.github.com/users/xudongcamsys/gists{/gist_id}","starred_url":"https://api.github.com/users/xudongcamsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xudongcamsys/subscriptions","organizations_url":"https://api.github.com/users/xudongcamsys/orgs","repos_url":"https://api.github.com/users/xudongcamsys/repos","events_url":"https://api.github.com/users/xudongcamsys/events{/privacy}","received_events_url":"https://api.github.com/users/xudongcamsys/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xudongcamsys/homefoodie","description":"A social platform to explore and share home-made delicious food in your neighborhood","fork":false,"url":"https://api.github.com/repos/xudongcamsys/homefoodie","forks_url":"https://api.github.com/repos/xudongcamsys/homefoodie/forks","keys_url":"https://api.github.com/repos/xudongcamsys/homefoodie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xudongcamsys/homefoodie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xudongcamsys/homefoodie/teams","hooks_url":"https://api.github.com/repos/xudongcamsys/homefoodie/hooks","issue_events_url":"https://api.github.com/repos/xudongcamsys/homefoodie/issues/events{/number}","events_url":"https://api.github.com/repos/xudongcamsys/homefoodie/events","assignees_url":"https://api.github.com/repos/xudongcamsys/homefoodie/assignees{/user}","branches_url":"https://api.github.com/repos/xudongcamsys/homefoodie/branches{/branch}","tags_url":"https://api.github.com/repos/xudongcamsys/homefoodie/tags","blobs_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/refs{/sha}","trees_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xudongcamsys/homefoodie/statuses/{sha}","languages_url":"https://api.github.com/repos/xudongcamsys/homefoodie/languages","stargazers_url":"https://api.github.com/repos/xudongcamsys/homefoodie/stargazers","contributors_url":"https://api.github.com/repos/xudongcamsys/homefoodie/contributors","subscribers_url":"https://api.github.com/repos/xudongcamsys/homefoodie/subscribers","subscription_url":"https://api.github.com/repos/xudongcamsys/homefoodie/subscription","commits_url":"https://api.github.com/repos/xudongcamsys/homefoodie/commits{/sha}","git_commits_url":"https://api.github.com/repos/xudongcamsys/homefoodie/git/commits{/sha}","comments_url":"https://api.github.com/repos/xudongcamsys/homefoodie/comments{/number}","issue_comment_url":"https://api.github.com/repos/xudongcamsys/homefoodie/issues/comments{/number}","contents_url":"https://api.github.com/repos/xudongcamsys/homefoodie/contents/{+path}","compare_url":"https://api.github.com/repos/xudongcamsys/homefoodie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xudongcamsys/homefoodie/merges","archive_url":"https://api.github.com/repos/xudongcamsys/homefoodie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xudongcamsys/homefoodie/downloads","issues_url":"https://api.github.com/repos/xudongcamsys/homefoodie/issues{/number}","pulls_url":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls{/number}","milestones_url":"https://api.github.com/repos/xudongcamsys/homefoodie/milestones{/number}","notifications_url":"https://api.github.com/repos/xudongcamsys/homefoodie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xudongcamsys/homefoodie/labels{/name}","releases_url":"https://api.github.com/repos/xudongcamsys/homefoodie/releases{/id}","created_at":"2015-04-24T18:08:10Z","updated_at":"2015-05-28T19:28:08Z","pushed_at":"2015-06-07T16:31:48Z","git_url":"git://github.com/xudongcamsys/homefoodie.git","ssh_url":"git@github.com:xudongcamsys/homefoodie.git","clone_url":"https://github.com/xudongcamsys/homefoodie.git","svn_url":"https://github.com/xudongcamsys/homefoodie","homepage":"http://www.homefoodie.io","size":500,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/5"},"html":{"href":"https://github.com/xudongcamsys/homefoodie/pull/5"},"issue":{"href":"https://api.github.com/repos/xudongcamsys/homefoodie/issues/5"},"comments":{"href":"https://api.github.com/repos/xudongcamsys/homefoodie/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xudongcamsys/homefoodie/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/xudongcamsys/homefoodie/statuses/286edb4f6cad7ba994540b6443049498525690fb"}}}}