{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/brs_24/pulls/comments/68704573","id":68704573,"diff_hunk":"@@ -0,0 +1,30 @@\n+class ActivitiesController < ApplicationController\n+  before_action :logged_in_user, only: [:create, :destroy]\n+\n+  def create\n+    @activity = current_user.activities.build activity_params\n+    unless @activity.save\n+      flash.now[:danger] = @activity.errors.full_messages\n+    end\n+    respond_to do |format|\n+      format.html {redirect_to root_url}\n+      format.js\n+    end\n+  end\n+\n+  def destroy\n+    @activity = Activity.find_by_id params[:id]\n+    @activity.destroy\n+    respond_to do |format|\n+      format.html {redirect_to root_url}\n+      format.js\n+    end\n+  end\n+\n+  private\n+  def activity_params\n+    params[:activity][:action_type] = params[:activity][:action_type].to_i","path":"app/controllers/activities_controller.rb","position":36,"original_position":26,"commit_id":"4d73f4245b237ae7a3859e1f87cb588149abb024","original_commit_id":"5f752754f089130c5852cde68f0cbb5aa89ec371","user":{"login":"VuThiHien94","id":9582917,"avatar_url":"https://avatars.githubusercontent.com/u/9582917?v=3","gravatar_id":"","url":"https://api.github.com/users/VuThiHien94","html_url":"https://github.com/VuThiHien94","followers_url":"https://api.github.com/users/VuThiHien94/followers","following_url":"https://api.github.com/users/VuThiHien94/following{/other_user}","gists_url":"https://api.github.com/users/VuThiHien94/gists{/gist_id}","starred_url":"https://api.github.com/users/VuThiHien94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VuThiHien94/subscriptions","organizations_url":"https://api.github.com/users/VuThiHien94/orgs","repos_url":"https://api.github.com/users/VuThiHien94/repos","events_url":"https://api.github.com/users/VuThiHien94/events{/privacy}","received_events_url":"https://api.github.com/users/VuThiHien94/received_events","type":"User","site_admin":false},"body":"có vì cái params nó gửi sang là string ","created_at":"2016-06-28T06:44:29Z","updated_at":"2016-06-28T06:44:29Z","html_url":"https://github.com/framgia/brs_24/pull/22#discussion_r68704573","pull_request_url":"https://api.github.com/repos/framgia/brs_24/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_24/pulls/comments/68704573"},"html":{"href":"https://github.com/framgia/brs_24/pull/22#discussion_r68704573"},"pull_request":{"href":"https://api.github.com/repos/framgia/brs_24/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/brs_24/pulls/22","id":75274605,"html_url":"https://github.com/framgia/brs_24/pull/22","diff_url":"https://github.com/framgia/brs_24/pull/22.diff","patch_url":"https://github.com/framgia/brs_24/pull/22.patch","issue_url":"https://api.github.com/repos/framgia/brs_24/issues/22","number":22,"state":"open","locked":false,"title":"Activity","user":{"login":"VuThiHien94","id":9582917,"avatar_url":"https://avatars.githubusercontent.com/u/9582917?v=3","gravatar_id":"","url":"https://api.github.com/users/VuThiHien94","html_url":"https://github.com/VuThiHien94","followers_url":"https://api.github.com/users/VuThiHien94/followers","following_url":"https://api.github.com/users/VuThiHien94/following{/other_user}","gists_url":"https://api.github.com/users/VuThiHien94/gists{/gist_id}","starred_url":"https://api.github.com/users/VuThiHien94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VuThiHien94/subscriptions","organizations_url":"https://api.github.com/users/VuThiHien94/orgs","repos_url":"https://api.github.com/users/VuThiHien94/repos","events_url":"https://api.github.com/users/VuThiHien94/events{/privacy}","received_events_url":"https://api.github.com/users/VuThiHien94/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-27T08:42:49Z","updated_at":"2016-06-28T06:44:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb6e2098bf0a8139c74a541612b59b9a4853b428","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/brs_24/pulls/22/commits","review_comments_url":"https://api.github.com/repos/framgia/brs_24/pulls/22/comments","review_comment_url":"https://api.github.com/repos/framgia/brs_24/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/brs_24/issues/22/comments","statuses_url":"https://api.github.com/repos/framgia/brs_24/statuses/4d73f4245b237ae7a3859e1f87cb588149abb024","head":{"label":"VuThiHien94:activity","ref":"activity","sha":"4d73f4245b237ae7a3859e1f87cb588149abb024","user":{"login":"VuThiHien94","id":9582917,"avatar_url":"https://avatars.githubusercontent.com/u/9582917?v=3","gravatar_id":"","url":"https://api.github.com/users/VuThiHien94","html_url":"https://github.com/VuThiHien94","followers_url":"https://api.github.com/users/VuThiHien94/followers","following_url":"https://api.github.com/users/VuThiHien94/following{/other_user}","gists_url":"https://api.github.com/users/VuThiHien94/gists{/gist_id}","starred_url":"https://api.github.com/users/VuThiHien94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VuThiHien94/subscriptions","organizations_url":"https://api.github.com/users/VuThiHien94/orgs","repos_url":"https://api.github.com/users/VuThiHien94/repos","events_url":"https://api.github.com/users/VuThiHien94/events{/privacy}","received_events_url":"https://api.github.com/users/VuThiHien94/received_events","type":"User","site_admin":false},"repo":{"id":61195853,"name":"brs_24","full_name":"VuThiHien94/brs_24","owner":{"login":"VuThiHien94","id":9582917,"avatar_url":"https://avatars.githubusercontent.com/u/9582917?v=3","gravatar_id":"","url":"https://api.github.com/users/VuThiHien94","html_url":"https://github.com/VuThiHien94","followers_url":"https://api.github.com/users/VuThiHien94/followers","following_url":"https://api.github.com/users/VuThiHien94/following{/other_user}","gists_url":"https://api.github.com/users/VuThiHien94/gists{/gist_id}","starred_url":"https://api.github.com/users/VuThiHien94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VuThiHien94/subscriptions","organizations_url":"https://api.github.com/users/VuThiHien94/orgs","repos_url":"https://api.github.com/users/VuThiHien94/repos","events_url":"https://api.github.com/users/VuThiHien94/events{/privacy}","received_events_url":"https://api.github.com/users/VuThiHien94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VuThiHien94/brs_24","description":"Framgia Book Reviewing System (training)","fork":true,"url":"https://api.github.com/repos/VuThiHien94/brs_24","forks_url":"https://api.github.com/repos/VuThiHien94/brs_24/forks","keys_url":"https://api.github.com/repos/VuThiHien94/brs_24/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VuThiHien94/brs_24/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VuThiHien94/brs_24/teams","hooks_url":"https://api.github.com/repos/VuThiHien94/brs_24/hooks","issue_events_url":"https://api.github.com/repos/VuThiHien94/brs_24/issues/events{/number}","events_url":"https://api.github.com/repos/VuThiHien94/brs_24/events","assignees_url":"https://api.github.com/repos/VuThiHien94/brs_24/assignees{/user}","branches_url":"https://api.github.com/repos/VuThiHien94/brs_24/branches{/branch}","tags_url":"https://api.github.com/repos/VuThiHien94/brs_24/tags","blobs_url":"https://api.github.com/repos/VuThiHien94/brs_24/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VuThiHien94/brs_24/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VuThiHien94/brs_24/git/refs{/sha}","trees_url":"https://api.github.com/repos/VuThiHien94/brs_24/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VuThiHien94/brs_24/statuses/{sha}","languages_url":"https://api.github.com/repos/VuThiHien94/brs_24/languages","stargazers_url":"https://api.github.com/repos/VuThiHien94/brs_24/stargazers","contributors_url":"https://api.github.com/repos/VuThiHien94/brs_24/contributors","subscribers_url":"https://api.github.com/repos/VuThiHien94/brs_24/subscribers","subscription_url":"https://api.github.com/repos/VuThiHien94/brs_24/subscription","commits_url":"https://api.github.com/repos/VuThiHien94/brs_24/commits{/sha}","git_commits_url":"https://api.github.com/repos/VuThiHien94/brs_24/git/commits{/sha}","comments_url":"https://api.github.com/repos/VuThiHien94/brs_24/comments{/number}","issue_comment_url":"https://api.github.com/repos/VuThiHien94/brs_24/issues/comments{/number}","contents_url":"https://api.github.com/repos/VuThiHien94/brs_24/contents/{+path}","compare_url":"https://api.github.com/repos/VuThiHien94/brs_24/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VuThiHien94/brs_24/merges","archive_url":"https://api.github.com/repos/VuThiHien94/brs_24/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VuThiHien94/brs_24/downloads","issues_url":"https://api.github.com/repos/VuThiHien94/brs_24/issues{/number}","pulls_url":"https://api.github.com/repos/VuThiHien94/brs_24/pulls{/number}","milestones_url":"https://api.github.com/repos/VuThiHien94/brs_24/milestones{/number}","notifications_url":"https://api.github.com/repos/VuThiHien94/brs_24/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VuThiHien94/brs_24/labels{/name}","releases_url":"https://api.github.com/repos/VuThiHien94/brs_24/releases{/id}","deployments_url":"https://api.github.com/repos/VuThiHien94/brs_24/deployments","created_at":"2016-06-15T09:34:02Z","updated_at":"2016-06-14T04:10:27Z","pushed_at":"2016-06-28T06:40:16Z","git_url":"git://github.com/VuThiHien94/brs_24.git","ssh_url":"git@github.com:VuThiHien94/brs_24.git","clone_url":"https://github.com/VuThiHien94/brs_24.git","svn_url":"https://github.com/VuThiHien94/brs_24","homepage":null,"size":355,"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":"bf731afb4d8fd06f9fe999995b1058cccb46aa43","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":61090972,"name":"brs_24","full_name":"framgia/brs_24","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_24","description":"Framgia Book Reviewing System (training)","fork":false,"url":"https://api.github.com/repos/framgia/brs_24","forks_url":"https://api.github.com/repos/framgia/brs_24/forks","keys_url":"https://api.github.com/repos/framgia/brs_24/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/brs_24/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/brs_24/teams","hooks_url":"https://api.github.com/repos/framgia/brs_24/hooks","issue_events_url":"https://api.github.com/repos/framgia/brs_24/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/brs_24/events","assignees_url":"https://api.github.com/repos/framgia/brs_24/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/brs_24/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/brs_24/tags","blobs_url":"https://api.github.com/repos/framgia/brs_24/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/brs_24/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/brs_24/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/brs_24/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/brs_24/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/brs_24/languages","stargazers_url":"https://api.github.com/repos/framgia/brs_24/stargazers","contributors_url":"https://api.github.com/repos/framgia/brs_24/contributors","subscribers_url":"https://api.github.com/repos/framgia/brs_24/subscribers","subscription_url":"https://api.github.com/repos/framgia/brs_24/subscription","commits_url":"https://api.github.com/repos/framgia/brs_24/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/brs_24/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/brs_24/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/brs_24/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/brs_24/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/brs_24/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/brs_24/merges","archive_url":"https://api.github.com/repos/framgia/brs_24/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/brs_24/downloads","issues_url":"https://api.github.com/repos/framgia/brs_24/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/brs_24/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/brs_24/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/brs_24/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/brs_24/labels{/name}","releases_url":"https://api.github.com/repos/framgia/brs_24/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/brs_24/deployments","created_at":"2016-06-14T04:10:27Z","updated_at":"2016-06-14T04:10:27Z","pushed_at":"2016-06-28T06:40:16Z","git_url":"git://github.com/framgia/brs_24.git","ssh_url":"git@github.com:framgia/brs_24.git","clone_url":"https://github.com/framgia/brs_24.git","svn_url":"https://github.com/framgia/brs_24","homepage":null,"size":366,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/brs_24/pulls/22"},"html":{"href":"https://github.com/framgia/brs_24/pull/22"},"issue":{"href":"https://api.github.com/repos/framgia/brs_24/issues/22"},"comments":{"href":"https://api.github.com/repos/framgia/brs_24/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/brs_24/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/brs_24/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/brs_24/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/brs_24/statuses/4d73f4245b237ae7a3859e1f87cb588149abb024"}}}}
{"actor":{"display_login":"VuThiHien94"}}