{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/brs_12/pulls/comments/31892859","id":31892859,"diff_hunk":"@@ -0,0 +1,11 @@\n+class RaterController < ApplicationController\n+  def create\n+    if user_signed_in?\n+      obj = params[:klass].classify.constantize.find(params[:id])\n+      obj.rate params[:score].to_f, current_user, params[:dimension]\n+      render :json => true","path":"app/controllers/rater_controller.rb","position":6,"original_position":6,"commit_id":"7416412a350c2bb370f131b0cf63f9154fda6036","original_commit_id":"7416412a350c2bb370f131b0cf63f9154fda6036","user":{"login":"dieunb","id":2122175,"avatar_url":"https://avatars.githubusercontent.com/u/2122175?v=3","gravatar_id":"","url":"https://api.github.com/users/dieunb","html_url":"https://github.com/dieunb","followers_url":"https://api.github.com/users/dieunb/followers","following_url":"https://api.github.com/users/dieunb/following{/other_user}","gists_url":"https://api.github.com/users/dieunb/gists{/gist_id}","starred_url":"https://api.github.com/users/dieunb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dieunb/subscriptions","organizations_url":"https://api.github.com/users/dieunb/orgs","repos_url":"https://api.github.com/users/dieunb/repos","events_url":"https://api.github.com/users/dieunb/events{/privacy}","received_events_url":"https://api.github.com/users/dieunb/received_events","type":"User","site_admin":false},"body":"coding convention","created_at":"2015-06-08T07:57:14Z","updated_at":"2015-06-08T07:57:14Z","html_url":"https://github.com/framgia/brs_12/pull/35#discussion_r31892859","pull_request_url":"https://api.github.com/repos/framgia/brs_12/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_12/pulls/comments/31892859"},"html":{"href":"https://github.com/framgia/brs_12/pull/35#discussion_r31892859"},"pull_request":{"href":"https://api.github.com/repos/framgia/brs_12/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/brs_12/pulls/35","id":37126065,"html_url":"https://github.com/framgia/brs_12/pull/35","diff_url":"https://github.com/framgia/brs_12/pull/35.diff","patch_url":"https://github.com/framgia/brs_12/pull/35.patch","issue_url":"https://api.github.com/repos/framgia/brs_12/issues/35","number":35,"state":"open","locked":false,"title":"Allow User To Rate A Book","user":{"login":"brokenheart1712","id":11383032,"avatar_url":"https://avatars.githubusercontent.com/u/11383032?v=3","gravatar_id":"","url":"https://api.github.com/users/brokenheart1712","html_url":"https://github.com/brokenheart1712","followers_url":"https://api.github.com/users/brokenheart1712/followers","following_url":"https://api.github.com/users/brokenheart1712/following{/other_user}","gists_url":"https://api.github.com/users/brokenheart1712/gists{/gist_id}","starred_url":"https://api.github.com/users/brokenheart1712/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brokenheart1712/subscriptions","organizations_url":"https://api.github.com/users/brokenheart1712/orgs","repos_url":"https://api.github.com/users/brokenheart1712/repos","events_url":"https://api.github.com/users/brokenheart1712/events{/privacy}","received_events_url":"https://api.github.com/users/brokenheart1712/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-08T06:53:31Z","updated_at":"2015-06-08T07:57:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"334f90e5e5e2a6a513a6cbf0508b1048e3ee51e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/brs_12/pulls/35/commits","review_comments_url":"https://api.github.com/repos/framgia/brs_12/pulls/35/comments","review_comment_url":"https://api.github.com/repos/framgia/brs_12/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/brs_12/issues/35/comments","statuses_url":"https://api.github.com/repos/framgia/brs_12/statuses/7416412a350c2bb370f131b0cf63f9154fda6036","head":{"label":"brokenheart1712:allow-user-to-rate","ref":"allow-user-to-rate","sha":"7416412a350c2bb370f131b0cf63f9154fda6036","user":{"login":"brokenheart1712","id":11383032,"avatar_url":"https://avatars.githubusercontent.com/u/11383032?v=3","gravatar_id":"","url":"https://api.github.com/users/brokenheart1712","html_url":"https://github.com/brokenheart1712","followers_url":"https://api.github.com/users/brokenheart1712/followers","following_url":"https://api.github.com/users/brokenheart1712/following{/other_user}","gists_url":"https://api.github.com/users/brokenheart1712/gists{/gist_id}","starred_url":"https://api.github.com/users/brokenheart1712/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brokenheart1712/subscriptions","organizations_url":"https://api.github.com/users/brokenheart1712/orgs","repos_url":"https://api.github.com/users/brokenheart1712/repos","events_url":"https://api.github.com/users/brokenheart1712/events{/privacy}","received_events_url":"https://api.github.com/users/brokenheart1712/received_events","type":"User","site_admin":false},"repo":{"id":36699949,"name":"brs_12","full_name":"brokenheart1712/brs_12","owner":{"login":"brokenheart1712","id":11383032,"avatar_url":"https://avatars.githubusercontent.com/u/11383032?v=3","gravatar_id":"","url":"https://api.github.com/users/brokenheart1712","html_url":"https://github.com/brokenheart1712","followers_url":"https://api.github.com/users/brokenheart1712/followers","following_url":"https://api.github.com/users/brokenheart1712/following{/other_user}","gists_url":"https://api.github.com/users/brokenheart1712/gists{/gist_id}","starred_url":"https://api.github.com/users/brokenheart1712/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brokenheart1712/subscriptions","organizations_url":"https://api.github.com/users/brokenheart1712/orgs","repos_url":"https://api.github.com/users/brokenheart1712/repos","events_url":"https://api.github.com/users/brokenheart1712/events{/privacy}","received_events_url":"https://api.github.com/users/brokenheart1712/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brokenheart1712/brs_12","description":"Framgia Book Reviewing System (training)","fork":true,"url":"https://api.github.com/repos/brokenheart1712/brs_12","forks_url":"https://api.github.com/repos/brokenheart1712/brs_12/forks","keys_url":"https://api.github.com/repos/brokenheart1712/brs_12/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brokenheart1712/brs_12/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brokenheart1712/brs_12/teams","hooks_url":"https://api.github.com/repos/brokenheart1712/brs_12/hooks","issue_events_url":"https://api.github.com/repos/brokenheart1712/brs_12/issues/events{/number}","events_url":"https://api.github.com/repos/brokenheart1712/brs_12/events","assignees_url":"https://api.github.com/repos/brokenheart1712/brs_12/assignees{/user}","branches_url":"https://api.github.com/repos/brokenheart1712/brs_12/branches{/branch}","tags_url":"https://api.github.com/repos/brokenheart1712/brs_12/tags","blobs_url":"https://api.github.com/repos/brokenheart1712/brs_12/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brokenheart1712/brs_12/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brokenheart1712/brs_12/git/refs{/sha}","trees_url":"https://api.github.com/repos/brokenheart1712/brs_12/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brokenheart1712/brs_12/statuses/{sha}","languages_url":"https://api.github.com/repos/brokenheart1712/brs_12/languages","stargazers_url":"https://api.github.com/repos/brokenheart1712/brs_12/stargazers","contributors_url":"https://api.github.com/repos/brokenheart1712/brs_12/contributors","subscribers_url":"https://api.github.com/repos/brokenheart1712/brs_12/subscribers","subscription_url":"https://api.github.com/repos/brokenheart1712/brs_12/subscription","commits_url":"https://api.github.com/repos/brokenheart1712/brs_12/commits{/sha}","git_commits_url":"https://api.github.com/repos/brokenheart1712/brs_12/git/commits{/sha}","comments_url":"https://api.github.com/repos/brokenheart1712/brs_12/comments{/number}","issue_comment_url":"https://api.github.com/repos/brokenheart1712/brs_12/issues/comments{/number}","contents_url":"https://api.github.com/repos/brokenheart1712/brs_12/contents/{+path}","compare_url":"https://api.github.com/repos/brokenheart1712/brs_12/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brokenheart1712/brs_12/merges","archive_url":"https://api.github.com/repos/brokenheart1712/brs_12/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brokenheart1712/brs_12/downloads","issues_url":"https://api.github.com/repos/brokenheart1712/brs_12/issues{/number}","pulls_url":"https://api.github.com/repos/brokenheart1712/brs_12/pulls{/number}","milestones_url":"https://api.github.com/repos/brokenheart1712/brs_12/milestones{/number}","notifications_url":"https://api.github.com/repos/brokenheart1712/brs_12/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brokenheart1712/brs_12/labels{/name}","releases_url":"https://api.github.com/repos/brokenheart1712/brs_12/releases{/id}","created_at":"2015-06-02T01:29:35Z","updated_at":"2015-06-01T06:06:26Z","pushed_at":"2015-06-08T07:45:11Z","git_url":"git://github.com/brokenheart1712/brs_12.git","ssh_url":"git@github.com:brokenheart1712/brs_12.git","clone_url":"https://github.com/brokenheart1712/brs_12.git","svn_url":"https://github.com/brokenheart1712/brs_12","homepage":null,"size":328,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"b3a7bca3b64502e8bda9651252ba3f7cf0f961db","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":36641228,"name":"brs_12","full_name":"framgia/brs_12","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/brs_12","description":"Framgia Book Reviewing System (training)","fork":false,"url":"https://api.github.com/repos/framgia/brs_12","forks_url":"https://api.github.com/repos/framgia/brs_12/forks","keys_url":"https://api.github.com/repos/framgia/brs_12/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/brs_12/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/brs_12/teams","hooks_url":"https://api.github.com/repos/framgia/brs_12/hooks","issue_events_url":"https://api.github.com/repos/framgia/brs_12/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/brs_12/events","assignees_url":"https://api.github.com/repos/framgia/brs_12/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/brs_12/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/brs_12/tags","blobs_url":"https://api.github.com/repos/framgia/brs_12/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/brs_12/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/brs_12/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/brs_12/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/brs_12/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/brs_12/languages","stargazers_url":"https://api.github.com/repos/framgia/brs_12/stargazers","contributors_url":"https://api.github.com/repos/framgia/brs_12/contributors","subscribers_url":"https://api.github.com/repos/framgia/brs_12/subscribers","subscription_url":"https://api.github.com/repos/framgia/brs_12/subscription","commits_url":"https://api.github.com/repos/framgia/brs_12/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/brs_12/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/brs_12/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/brs_12/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/brs_12/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/brs_12/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/brs_12/merges","archive_url":"https://api.github.com/repos/framgia/brs_12/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/brs_12/downloads","issues_url":"https://api.github.com/repos/framgia/brs_12/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/brs_12/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/brs_12/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/brs_12/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/brs_12/labels{/name}","releases_url":"https://api.github.com/repos/framgia/brs_12/releases{/id}","created_at":"2015-06-01T06:06:26Z","updated_at":"2015-06-01T06:06:26Z","pushed_at":"2015-06-08T07:55:32Z","git_url":"git://github.com/framgia/brs_12.git","ssh_url":"git@github.com:framgia/brs_12.git","clone_url":"https://github.com/framgia/brs_12.git","svn_url":"https://github.com/framgia/brs_12","homepage":null,"size":1153,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_12/pulls/35"},"html":{"href":"https://github.com/framgia/brs_12/pull/35"},"issue":{"href":"https://api.github.com/repos/framgia/brs_12/issues/35"},"comments":{"href":"https://api.github.com/repos/framgia/brs_12/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/brs_12/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/brs_12/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/brs_12/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/brs_12/statuses/7416412a350c2bb370f131b0cf63f9154fda6036"}}}}