{"action":"created","comment":{"url":"https://api.github.com/repos/andela-mogala/shot/pulls/comments/82699989","pull_request_review_id":3589419,"id":82699989,"diff_hunk":"@@ -38,26 +35,20 @@ def update\n     end\n   end\n \n-  def activate\n-    @link.update_attributes(active: true)\n-    flash[:notice] = link_activated\n+  def toggle_activate\n+    flash[:notice] = link_deactivated\n+    flash[:notice] = link_activated if params[:active] == 'true'\n+    @link.update_attributes(active: params[:active])\n     redirect_to :back\n   end\n \n-  def deactivate\n-    if @link.update_attributes(active: false)\n-      flash[:notice] = link_deactivated\n-      redirect_to :back\n-    end\n-  end\n-\n   def destroy\n     @link.destroy\n     flash[:notice] = link_deleted\n     redirect_to dashboard_path\n   end\n \n-  private\n+private","path":"app/controllers/links_controller.rb","position":45,"original_position":45,"commit_id":"efffcadaf4c3a63bb5db919981caaaafa7e797ba","original_commit_id":"efffcadaf4c3a63bb5db919981caaaafa7e797ba","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Indent access modifiers like private.","created_at":"2016-10-10T23:13:55Z","updated_at":"2016-10-10T23:13:55Z","html_url":"https://github.com/andela-mogala/shot/pull/7#discussion_r82699989","pull_request_url":"https://api.github.com/repos/andela-mogala/shot/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/andela-mogala/shot/pulls/comments/82699989"},"html":{"href":"https://github.com/andela-mogala/shot/pull/7#discussion_r82699989"},"pull_request":{"href":"https://api.github.com/repos/andela-mogala/shot/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/andela-mogala/shot/pulls/7","id":88746424,"html_url":"https://github.com/andela-mogala/shot/pull/7","diff_url":"https://github.com/andela-mogala/shot/pull/7.diff","patch_url":"https://github.com/andela-mogala/shot/pull/7.patch","issue_url":"https://api.github.com/repos/andela-mogala/shot/issues/7","number":7,"state":"open","locked":false,"title":"Refactor","user":{"login":"andela-mogala","id":20759355,"avatar_url":"https://avatars.githubusercontent.com/u/20759355?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mogala","html_url":"https://github.com/andela-mogala","followers_url":"https://api.github.com/users/andela-mogala/followers","following_url":"https://api.github.com/users/andela-mogala/following{/other_user}","gists_url":"https://api.github.com/users/andela-mogala/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mogala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mogala/subscriptions","organizations_url":"https://api.github.com/users/andela-mogala/orgs","repos_url":"https://api.github.com/users/andela-mogala/repos","events_url":"https://api.github.com/users/andela-mogala/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mogala/received_events","type":"User","site_admin":false},"body":"Rewrite the code and user presenters","created_at":"2016-10-10T23:13:45Z","updated_at":"2016-10-10T23:13:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5b50ca0ea4657a7f25bab2a1636f39d9b55b75e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela-mogala/shot/pulls/7/commits","review_comments_url":"https://api.github.com/repos/andela-mogala/shot/pulls/7/comments","review_comment_url":"https://api.github.com/repos/andela-mogala/shot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-mogala/shot/issues/7/comments","statuses_url":"https://api.github.com/repos/andela-mogala/shot/statuses/efffcadaf4c3a63bb5db919981caaaafa7e797ba","head":{"label":"andela-mogala:refactor","ref":"refactor","sha":"efffcadaf4c3a63bb5db919981caaaafa7e797ba","user":{"login":"andela-mogala","id":20759355,"avatar_url":"https://avatars.githubusercontent.com/u/20759355?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mogala","html_url":"https://github.com/andela-mogala","followers_url":"https://api.github.com/users/andela-mogala/followers","following_url":"https://api.github.com/users/andela-mogala/following{/other_user}","gists_url":"https://api.github.com/users/andela-mogala/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mogala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mogala/subscriptions","organizations_url":"https://api.github.com/users/andela-mogala/orgs","repos_url":"https://api.github.com/users/andela-mogala/repos","events_url":"https://api.github.com/users/andela-mogala/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mogala/received_events","type":"User","site_admin":false},"repo":{"id":67685743,"name":"shot","full_name":"andela-mogala/shot","owner":{"login":"andela-mogala","id":20759355,"avatar_url":"https://avatars.githubusercontent.com/u/20759355?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mogala","html_url":"https://github.com/andela-mogala","followers_url":"https://api.github.com/users/andela-mogala/followers","following_url":"https://api.github.com/users/andela-mogala/following{/other_user}","gists_url":"https://api.github.com/users/andela-mogala/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mogala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mogala/subscriptions","organizations_url":"https://api.github.com/users/andela-mogala/orgs","repos_url":"https://api.github.com/users/andela-mogala/repos","events_url":"https://api.github.com/users/andela-mogala/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mogala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-mogala/shot","description":"A Url-Shortener that lives on Heroku. ","fork":false,"url":"https://api.github.com/repos/andela-mogala/shot","forks_url":"https://api.github.com/repos/andela-mogala/shot/forks","keys_url":"https://api.github.com/repos/andela-mogala/shot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-mogala/shot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-mogala/shot/teams","hooks_url":"https://api.github.com/repos/andela-mogala/shot/hooks","issue_events_url":"https://api.github.com/repos/andela-mogala/shot/issues/events{/number}","events_url":"https://api.github.com/repos/andela-mogala/shot/events","assignees_url":"https://api.github.com/repos/andela-mogala/shot/assignees{/user}","branches_url":"https://api.github.com/repos/andela-mogala/shot/branches{/branch}","tags_url":"https://api.github.com/repos/andela-mogala/shot/tags","blobs_url":"https://api.github.com/repos/andela-mogala/shot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-mogala/shot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-mogala/shot/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-mogala/shot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-mogala/shot/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-mogala/shot/languages","stargazers_url":"https://api.github.com/repos/andela-mogala/shot/stargazers","contributors_url":"https://api.github.com/repos/andela-mogala/shot/contributors","subscribers_url":"https://api.github.com/repos/andela-mogala/shot/subscribers","subscription_url":"https://api.github.com/repos/andela-mogala/shot/subscription","commits_url":"https://api.github.com/repos/andela-mogala/shot/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-mogala/shot/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-mogala/shot/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-mogala/shot/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-mogala/shot/contents/{+path}","compare_url":"https://api.github.com/repos/andela-mogala/shot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-mogala/shot/merges","archive_url":"https://api.github.com/repos/andela-mogala/shot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-mogala/shot/downloads","issues_url":"https://api.github.com/repos/andela-mogala/shot/issues{/number}","pulls_url":"https://api.github.com/repos/andela-mogala/shot/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-mogala/shot/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-mogala/shot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-mogala/shot/labels{/name}","releases_url":"https://api.github.com/repos/andela-mogala/shot/releases{/id}","deployments_url":"https://api.github.com/repos/andela-mogala/shot/deployments","created_at":"2016-09-08T08:50:23Z","updated_at":"2016-09-08T08:51:11Z","pushed_at":"2016-10-10T23:13:46Z","git_url":"git://github.com/andela-mogala/shot.git","ssh_url":"git@github.com:andela-mogala/shot.git","clone_url":"https://github.com/andela-mogala/shot.git","svn_url":"https://github.com/andela-mogala/shot","homepage":null,"size":1097,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"andela-mogala:master","ref":"master","sha":"e7fb6b49ea073c8a7a4422b33d13bf27a54dd987","user":{"login":"andela-mogala","id":20759355,"avatar_url":"https://avatars.githubusercontent.com/u/20759355?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mogala","html_url":"https://github.com/andela-mogala","followers_url":"https://api.github.com/users/andela-mogala/followers","following_url":"https://api.github.com/users/andela-mogala/following{/other_user}","gists_url":"https://api.github.com/users/andela-mogala/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mogala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mogala/subscriptions","organizations_url":"https://api.github.com/users/andela-mogala/orgs","repos_url":"https://api.github.com/users/andela-mogala/repos","events_url":"https://api.github.com/users/andela-mogala/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mogala/received_events","type":"User","site_admin":false},"repo":{"id":67685743,"name":"shot","full_name":"andela-mogala/shot","owner":{"login":"andela-mogala","id":20759355,"avatar_url":"https://avatars.githubusercontent.com/u/20759355?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mogala","html_url":"https://github.com/andela-mogala","followers_url":"https://api.github.com/users/andela-mogala/followers","following_url":"https://api.github.com/users/andela-mogala/following{/other_user}","gists_url":"https://api.github.com/users/andela-mogala/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mogala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mogala/subscriptions","organizations_url":"https://api.github.com/users/andela-mogala/orgs","repos_url":"https://api.github.com/users/andela-mogala/repos","events_url":"https://api.github.com/users/andela-mogala/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mogala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-mogala/shot","description":"A Url-Shortener that lives on Heroku. ","fork":false,"url":"https://api.github.com/repos/andela-mogala/shot","forks_url":"https://api.github.com/repos/andela-mogala/shot/forks","keys_url":"https://api.github.com/repos/andela-mogala/shot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-mogala/shot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-mogala/shot/teams","hooks_url":"https://api.github.com/repos/andela-mogala/shot/hooks","issue_events_url":"https://api.github.com/repos/andela-mogala/shot/issues/events{/number}","events_url":"https://api.github.com/repos/andela-mogala/shot/events","assignees_url":"https://api.github.com/repos/andela-mogala/shot/assignees{/user}","branches_url":"https://api.github.com/repos/andela-mogala/shot/branches{/branch}","tags_url":"https://api.github.com/repos/andela-mogala/shot/tags","blobs_url":"https://api.github.com/repos/andela-mogala/shot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-mogala/shot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-mogala/shot/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-mogala/shot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-mogala/shot/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-mogala/shot/languages","stargazers_url":"https://api.github.com/repos/andela-mogala/shot/stargazers","contributors_url":"https://api.github.com/repos/andela-mogala/shot/contributors","subscribers_url":"https://api.github.com/repos/andela-mogala/shot/subscribers","subscription_url":"https://api.github.com/repos/andela-mogala/shot/subscription","commits_url":"https://api.github.com/repos/andela-mogala/shot/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-mogala/shot/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-mogala/shot/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-mogala/shot/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-mogala/shot/contents/{+path}","compare_url":"https://api.github.com/repos/andela-mogala/shot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-mogala/shot/merges","archive_url":"https://api.github.com/repos/andela-mogala/shot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-mogala/shot/downloads","issues_url":"https://api.github.com/repos/andela-mogala/shot/issues{/number}","pulls_url":"https://api.github.com/repos/andela-mogala/shot/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-mogala/shot/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-mogala/shot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-mogala/shot/labels{/name}","releases_url":"https://api.github.com/repos/andela-mogala/shot/releases{/id}","deployments_url":"https://api.github.com/repos/andela-mogala/shot/deployments","created_at":"2016-09-08T08:50:23Z","updated_at":"2016-09-08T08:51:11Z","pushed_at":"2016-10-10T23:13:46Z","git_url":"git://github.com/andela-mogala/shot.git","ssh_url":"git@github.com:andela-mogala/shot.git","clone_url":"https://github.com/andela-mogala/shot.git","svn_url":"https://github.com/andela-mogala/shot","homepage":null,"size":1097,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela-mogala/shot/pulls/7"},"html":{"href":"https://github.com/andela-mogala/shot/pull/7"},"issue":{"href":"https://api.github.com/repos/andela-mogala/shot/issues/7"},"comments":{"href":"https://api.github.com/repos/andela-mogala/shot/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-mogala/shot/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-mogala/shot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-mogala/shot/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/andela-mogala/shot/statuses/efffcadaf4c3a63bb5db919981caaaafa7e797ba"}}}}
{"actor":{"display_login":"houndci-bot"}}