{"action":"created","comment":{"url":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/comments/68491331","id":68491331,"diff_hunk":"@@ -29,24 +29,23 @@ def edit\n   def create\n     @url = Url.new(url_params)\n     @url.user_id = current_user.id if current_user\n+    \n \n     if @url.save\n-      flash.now[:short_url] = \"#{root_url}#{@url.short_url}\"\n+      flash[:short_url] = \"#{root_url}#{@url.short_url}\" if current_user.nil?\n       redirect_to root_path\n     else\n       redirect_to urls_path, notice: 'Please enter a valid url'\n     end\n   end\n \n-  # PATCH/PUT /urls/1\n+  # update urls\n   def update\n     respond_to do |format|\n       if @url.update(url_params)\n-        format.html { redirect_to @url, notice: 'Url was successfully updated.' }\n-        format.json { render :show, status: :ok, location: @url }\n+        redirect_to @url, notice: 'Url was successfully updated.'","path":"app/controllers/urls_controller.rb","position":22,"original_position":22,"commit_id":"a9270db0703ad74fd772e281733a35cd81cb6b5b","original_commit_id":"a9270db0703ad74fd772e281733a35cd81cb6b5b","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":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2016-06-25T17:35:54Z","updated_at":"2016-06-25T17:35:54Z","html_url":"https://github.com/andela-tfowotade/cutit/pull/11#discussion_r68491331","pull_request_url":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/comments/68491331"},"html":{"href":"https://github.com/andela-tfowotade/cutit/pull/11#discussion_r68491331"},"pull_request":{"href":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/11","id":75210094,"html_url":"https://github.com/andela-tfowotade/cutit/pull/11","diff_url":"https://github.com/andela-tfowotade/cutit/pull/11.diff","patch_url":"https://github.com/andela-tfowotade/cutit/pull/11.patch","issue_url":"https://api.github.com/repos/andela-tfowotade/cutit/issues/11","number":11,"state":"open","locked":false,"title":"122275281 Url click count","user":{"login":"andela-tfowotade","id":14174912,"avatar_url":"https://avatars.githubusercontent.com/u/14174912?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-tfowotade","html_url":"https://github.com/andela-tfowotade","followers_url":"https://api.github.com/users/andela-tfowotade/followers","following_url":"https://api.github.com/users/andela-tfowotade/following{/other_user}","gists_url":"https://api.github.com/users/andela-tfowotade/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-tfowotade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-tfowotade/subscriptions","organizations_url":"https://api.github.com/users/andela-tfowotade/orgs","repos_url":"https://api.github.com/users/andela-tfowotade/repos","events_url":"https://api.github.com/users/andela-tfowotade/events{/privacy}","received_events_url":"https://api.github.com/users/andela-tfowotade/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-25T17:35:45Z","updated_at":"2016-06-25T17:35:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b2c1aa3cf58caa9ee817f5fe80aa26e089ac91c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/11/commits","review_comments_url":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/11/comments","review_comment_url":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-tfowotade/cutit/issues/11/comments","statuses_url":"https://api.github.com/repos/andela-tfowotade/cutit/statuses/a9270db0703ad74fd772e281733a35cd81cb6b5b","head":{"label":"andela-tfowotade:ft-number-of-visits","ref":"ft-number-of-visits","sha":"a9270db0703ad74fd772e281733a35cd81cb6b5b","user":{"login":"andela-tfowotade","id":14174912,"avatar_url":"https://avatars.githubusercontent.com/u/14174912?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-tfowotade","html_url":"https://github.com/andela-tfowotade","followers_url":"https://api.github.com/users/andela-tfowotade/followers","following_url":"https://api.github.com/users/andela-tfowotade/following{/other_user}","gists_url":"https://api.github.com/users/andela-tfowotade/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-tfowotade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-tfowotade/subscriptions","organizations_url":"https://api.github.com/users/andela-tfowotade/orgs","repos_url":"https://api.github.com/users/andela-tfowotade/repos","events_url":"https://api.github.com/users/andela-tfowotade/events{/privacy}","received_events_url":"https://api.github.com/users/andela-tfowotade/received_events","type":"User","site_admin":false},"repo":{"id":61325732,"name":"cutit","full_name":"andela-tfowotade/cutit","owner":{"login":"andela-tfowotade","id":14174912,"avatar_url":"https://avatars.githubusercontent.com/u/14174912?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-tfowotade","html_url":"https://github.com/andela-tfowotade","followers_url":"https://api.github.com/users/andela-tfowotade/followers","following_url":"https://api.github.com/users/andela-tfowotade/following{/other_user}","gists_url":"https://api.github.com/users/andela-tfowotade/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-tfowotade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-tfowotade/subscriptions","organizations_url":"https://api.github.com/users/andela-tfowotade/orgs","repos_url":"https://api.github.com/users/andela-tfowotade/repos","events_url":"https://api.github.com/users/andela-tfowotade/events{/privacy}","received_events_url":"https://api.github.com/users/andela-tfowotade/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-tfowotade/cutit","description":"A Url shortening service.","fork":false,"url":"https://api.github.com/repos/andela-tfowotade/cutit","forks_url":"https://api.github.com/repos/andela-tfowotade/cutit/forks","keys_url":"https://api.github.com/repos/andela-tfowotade/cutit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-tfowotade/cutit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-tfowotade/cutit/teams","hooks_url":"https://api.github.com/repos/andela-tfowotade/cutit/hooks","issue_events_url":"https://api.github.com/repos/andela-tfowotade/cutit/issues/events{/number}","events_url":"https://api.github.com/repos/andela-tfowotade/cutit/events","assignees_url":"https://api.github.com/repos/andela-tfowotade/cutit/assignees{/user}","branches_url":"https://api.github.com/repos/andela-tfowotade/cutit/branches{/branch}","tags_url":"https://api.github.com/repos/andela-tfowotade/cutit/tags","blobs_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-tfowotade/cutit/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-tfowotade/cutit/languages","stargazers_url":"https://api.github.com/repos/andela-tfowotade/cutit/stargazers","contributors_url":"https://api.github.com/repos/andela-tfowotade/cutit/contributors","subscribers_url":"https://api.github.com/repos/andela-tfowotade/cutit/subscribers","subscription_url":"https://api.github.com/repos/andela-tfowotade/cutit/subscription","commits_url":"https://api.github.com/repos/andela-tfowotade/cutit/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-tfowotade/cutit/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-tfowotade/cutit/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-tfowotade/cutit/contents/{+path}","compare_url":"https://api.github.com/repos/andela-tfowotade/cutit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-tfowotade/cutit/merges","archive_url":"https://api.github.com/repos/andela-tfowotade/cutit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-tfowotade/cutit/downloads","issues_url":"https://api.github.com/repos/andela-tfowotade/cutit/issues{/number}","pulls_url":"https://api.github.com/repos/andela-tfowotade/cutit/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-tfowotade/cutit/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-tfowotade/cutit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-tfowotade/cutit/labels{/name}","releases_url":"https://api.github.com/repos/andela-tfowotade/cutit/releases{/id}","deployments_url":"https://api.github.com/repos/andela-tfowotade/cutit/deployments","created_at":"2016-06-16T21:03:08Z","updated_at":"2016-06-18T15:18:59Z","pushed_at":"2016-06-25T17:35:45Z","git_url":"git://github.com/andela-tfowotade/cutit.git","ssh_url":"git@github.com:andela-tfowotade/cutit.git","clone_url":"https://github.com/andela-tfowotade/cutit.git","svn_url":"https://github.com/andela-tfowotade/cutit","homepage":null,"size":73,"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":"develop"}},"base":{"label":"andela-tfowotade:develop","ref":"develop","sha":"69c20aed0fb1c697341b4934b9f35578b091c79c","user":{"login":"andela-tfowotade","id":14174912,"avatar_url":"https://avatars.githubusercontent.com/u/14174912?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-tfowotade","html_url":"https://github.com/andela-tfowotade","followers_url":"https://api.github.com/users/andela-tfowotade/followers","following_url":"https://api.github.com/users/andela-tfowotade/following{/other_user}","gists_url":"https://api.github.com/users/andela-tfowotade/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-tfowotade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-tfowotade/subscriptions","organizations_url":"https://api.github.com/users/andela-tfowotade/orgs","repos_url":"https://api.github.com/users/andela-tfowotade/repos","events_url":"https://api.github.com/users/andela-tfowotade/events{/privacy}","received_events_url":"https://api.github.com/users/andela-tfowotade/received_events","type":"User","site_admin":false},"repo":{"id":61325732,"name":"cutit","full_name":"andela-tfowotade/cutit","owner":{"login":"andela-tfowotade","id":14174912,"avatar_url":"https://avatars.githubusercontent.com/u/14174912?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-tfowotade","html_url":"https://github.com/andela-tfowotade","followers_url":"https://api.github.com/users/andela-tfowotade/followers","following_url":"https://api.github.com/users/andela-tfowotade/following{/other_user}","gists_url":"https://api.github.com/users/andela-tfowotade/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-tfowotade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-tfowotade/subscriptions","organizations_url":"https://api.github.com/users/andela-tfowotade/orgs","repos_url":"https://api.github.com/users/andela-tfowotade/repos","events_url":"https://api.github.com/users/andela-tfowotade/events{/privacy}","received_events_url":"https://api.github.com/users/andela-tfowotade/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-tfowotade/cutit","description":"A Url shortening service.","fork":false,"url":"https://api.github.com/repos/andela-tfowotade/cutit","forks_url":"https://api.github.com/repos/andela-tfowotade/cutit/forks","keys_url":"https://api.github.com/repos/andela-tfowotade/cutit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-tfowotade/cutit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-tfowotade/cutit/teams","hooks_url":"https://api.github.com/repos/andela-tfowotade/cutit/hooks","issue_events_url":"https://api.github.com/repos/andela-tfowotade/cutit/issues/events{/number}","events_url":"https://api.github.com/repos/andela-tfowotade/cutit/events","assignees_url":"https://api.github.com/repos/andela-tfowotade/cutit/assignees{/user}","branches_url":"https://api.github.com/repos/andela-tfowotade/cutit/branches{/branch}","tags_url":"https://api.github.com/repos/andela-tfowotade/cutit/tags","blobs_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-tfowotade/cutit/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-tfowotade/cutit/languages","stargazers_url":"https://api.github.com/repos/andela-tfowotade/cutit/stargazers","contributors_url":"https://api.github.com/repos/andela-tfowotade/cutit/contributors","subscribers_url":"https://api.github.com/repos/andela-tfowotade/cutit/subscribers","subscription_url":"https://api.github.com/repos/andela-tfowotade/cutit/subscription","commits_url":"https://api.github.com/repos/andela-tfowotade/cutit/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-tfowotade/cutit/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-tfowotade/cutit/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-tfowotade/cutit/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-tfowotade/cutit/contents/{+path}","compare_url":"https://api.github.com/repos/andela-tfowotade/cutit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-tfowotade/cutit/merges","archive_url":"https://api.github.com/repos/andela-tfowotade/cutit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-tfowotade/cutit/downloads","issues_url":"https://api.github.com/repos/andela-tfowotade/cutit/issues{/number}","pulls_url":"https://api.github.com/repos/andela-tfowotade/cutit/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-tfowotade/cutit/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-tfowotade/cutit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-tfowotade/cutit/labels{/name}","releases_url":"https://api.github.com/repos/andela-tfowotade/cutit/releases{/id}","deployments_url":"https://api.github.com/repos/andela-tfowotade/cutit/deployments","created_at":"2016-06-16T21:03:08Z","updated_at":"2016-06-18T15:18:59Z","pushed_at":"2016-06-25T17:35:45Z","git_url":"git://github.com/andela-tfowotade/cutit.git","ssh_url":"git@github.com:andela-tfowotade/cutit.git","clone_url":"https://github.com/andela-tfowotade/cutit.git","svn_url":"https://github.com/andela-tfowotade/cutit","homepage":null,"size":73,"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":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/11"},"html":{"href":"https://github.com/andela-tfowotade/cutit/pull/11"},"issue":{"href":"https://api.github.com/repos/andela-tfowotade/cutit/issues/11"},"comments":{"href":"https://api.github.com/repos/andela-tfowotade/cutit/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-tfowotade/cutit/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/andela-tfowotade/cutit/statuses/a9270db0703ad74fd772e281733a35cd81cb6b5b"}}}}
{"actor":{"display_login":"houndci-bot"}}