{"action":"created","comment":{"url":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/comments/25570569","id":25570569,"diff_hunk":"@@ -1,52 +1,52 @@\n module Admin\n   class NewsController < ApplicationController\n-    \n+\n     before_action :authenticate_user\n-    \n+\n     def index\n       @news = News.all\n     end\n-    \n+\n     def new\n       @news_item = News.new\n     end\n-    \n+\n     def create\n       @news_item = News.new(news_params)\n-  \n+\n       if @news_item.save\n         redirect_to admin_news_index_path, notice: 'News item was successfully created.'\n       else\n         render action: \"new\"\n       end\n     end\n-    \n+\n     def edit\n       @news_item = News.find_by(slug: params[:id])\n     end\n-    \n+\n     def update\n       @news_item = News.find_by(slug: params[:id])\n-  \n+\n       if @news_item.update_attributes(news_params)\n         redirect_to admin_news_index_path, notice: 'News was successfully updated.'\n       else\n         render action: \"edit\"\n       end\n     end\n-    \n+\n     def destroy\n       @news_item = News.find_by(slug: params[:id])\n       @news_item.destroy\n-      \n+\n       redirect_to admin_news_index_path, notice: 'News was successfully deleted.'\n     end\n-    \n+\n     private\n-      \n+\n     def news_params\n       params.require(:news).permit(:title, :preamble, :content, :published_at)\n     end\n-    \n+","path":"app/controllers/admin/news_controller.rb","position":63,"original_position":63,"commit_id":"21ef3631142857385a9f8470b2ca9d8f0744d69c","original_commit_id":"21ef3631142857385a9f8470b2ca9d8f0744d69c","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Extra empty line detected at class body end.","created_at":"2015-03-01T19:52:02Z","updated_at":"2015-03-01T19:52:02Z","html_url":"https://github.com/andreaseriksson/btfoto/pull/1#discussion_r25570569","pull_request_url":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/comments/25570569"},"html":{"href":"https://github.com/andreaseriksson/btfoto/pull/1#discussion_r25570569"},"pull_request":{"href":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/1","id":30247452,"html_url":"https://github.com/andreaseriksson/btfoto/pull/1","diff_url":"https://github.com/andreaseriksson/btfoto/pull/1.diff","patch_url":"https://github.com/andreaseriksson/btfoto/pull/1.patch","issue_url":"https://api.github.com/repos/andreaseriksson/btfoto/issues/1","number":1,"state":"open","locked":false,"title":"Rails 4.2","user":{"login":"andreaseriksson","id":897748,"avatar_url":"https://avatars.githubusercontent.com/u/897748?v=3","gravatar_id":"","url":"https://api.github.com/users/andreaseriksson","html_url":"https://github.com/andreaseriksson","followers_url":"https://api.github.com/users/andreaseriksson/followers","following_url":"https://api.github.com/users/andreaseriksson/following{/other_user}","gists_url":"https://api.github.com/users/andreaseriksson/gists{/gist_id}","starred_url":"https://api.github.com/users/andreaseriksson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreaseriksson/subscriptions","organizations_url":"https://api.github.com/users/andreaseriksson/orgs","repos_url":"https://api.github.com/users/andreaseriksson/repos","events_url":"https://api.github.com/users/andreaseriksson/events{/privacy}","received_events_url":"https://api.github.com/users/andreaseriksson/received_events","type":"User","site_admin":false},"body":"Update to rails 4.2 and clean up views","created_at":"2015-03-01T19:51:51Z","updated_at":"2015-03-01T19:52:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"970371785ab2c2d814e3d524d8772f827591e6d9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/1/commits","review_comments_url":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/1/comments","review_comment_url":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andreaseriksson/btfoto/issues/1/comments","statuses_url":"https://api.github.com/repos/andreaseriksson/btfoto/statuses/21ef3631142857385a9f8470b2ca9d8f0744d69c","head":{"label":"andreaseriksson:rails-4.2","ref":"rails-4.2","sha":"21ef3631142857385a9f8470b2ca9d8f0744d69c","user":{"login":"andreaseriksson","id":897748,"avatar_url":"https://avatars.githubusercontent.com/u/897748?v=3","gravatar_id":"","url":"https://api.github.com/users/andreaseriksson","html_url":"https://github.com/andreaseriksson","followers_url":"https://api.github.com/users/andreaseriksson/followers","following_url":"https://api.github.com/users/andreaseriksson/following{/other_user}","gists_url":"https://api.github.com/users/andreaseriksson/gists{/gist_id}","starred_url":"https://api.github.com/users/andreaseriksson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreaseriksson/subscriptions","organizations_url":"https://api.github.com/users/andreaseriksson/orgs","repos_url":"https://api.github.com/users/andreaseriksson/repos","events_url":"https://api.github.com/users/andreaseriksson/events{/privacy}","received_events_url":"https://api.github.com/users/andreaseriksson/received_events","type":"User","site_admin":false},"repo":{"id":12195033,"name":"btfoto","full_name":"andreaseriksson/btfoto","owner":{"login":"andreaseriksson","id":897748,"avatar_url":"https://avatars.githubusercontent.com/u/897748?v=3","gravatar_id":"","url":"https://api.github.com/users/andreaseriksson","html_url":"https://github.com/andreaseriksson","followers_url":"https://api.github.com/users/andreaseriksson/followers","following_url":"https://api.github.com/users/andreaseriksson/following{/other_user}","gists_url":"https://api.github.com/users/andreaseriksson/gists{/gist_id}","starred_url":"https://api.github.com/users/andreaseriksson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreaseriksson/subscriptions","organizations_url":"https://api.github.com/users/andreaseriksson/orgs","repos_url":"https://api.github.com/users/andreaseriksson/repos","events_url":"https://api.github.com/users/andreaseriksson/events{/privacy}","received_events_url":"https://api.github.com/users/andreaseriksson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreaseriksson/btfoto","description":"Repo for www.btfoto.se","fork":false,"url":"https://api.github.com/repos/andreaseriksson/btfoto","forks_url":"https://api.github.com/repos/andreaseriksson/btfoto/forks","keys_url":"https://api.github.com/repos/andreaseriksson/btfoto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreaseriksson/btfoto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreaseriksson/btfoto/teams","hooks_url":"https://api.github.com/repos/andreaseriksson/btfoto/hooks","issue_events_url":"https://api.github.com/repos/andreaseriksson/btfoto/issues/events{/number}","events_url":"https://api.github.com/repos/andreaseriksson/btfoto/events","assignees_url":"https://api.github.com/repos/andreaseriksson/btfoto/assignees{/user}","branches_url":"https://api.github.com/repos/andreaseriksson/btfoto/branches{/branch}","tags_url":"https://api.github.com/repos/andreaseriksson/btfoto/tags","blobs_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreaseriksson/btfoto/statuses/{sha}","languages_url":"https://api.github.com/repos/andreaseriksson/btfoto/languages","stargazers_url":"https://api.github.com/repos/andreaseriksson/btfoto/stargazers","contributors_url":"https://api.github.com/repos/andreaseriksson/btfoto/contributors","subscribers_url":"https://api.github.com/repos/andreaseriksson/btfoto/subscribers","subscription_url":"https://api.github.com/repos/andreaseriksson/btfoto/subscription","commits_url":"https://api.github.com/repos/andreaseriksson/btfoto/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreaseriksson/btfoto/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreaseriksson/btfoto/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreaseriksson/btfoto/contents/{+path}","compare_url":"https://api.github.com/repos/andreaseriksson/btfoto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreaseriksson/btfoto/merges","archive_url":"https://api.github.com/repos/andreaseriksson/btfoto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreaseriksson/btfoto/downloads","issues_url":"https://api.github.com/repos/andreaseriksson/btfoto/issues{/number}","pulls_url":"https://api.github.com/repos/andreaseriksson/btfoto/pulls{/number}","milestones_url":"https://api.github.com/repos/andreaseriksson/btfoto/milestones{/number}","notifications_url":"https://api.github.com/repos/andreaseriksson/btfoto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreaseriksson/btfoto/labels{/name}","releases_url":"https://api.github.com/repos/andreaseriksson/btfoto/releases{/id}","created_at":"2013-08-18T12:31:54Z","updated_at":"2014-09-21T13:52:52Z","pushed_at":"2015-03-01T19:50:51Z","git_url":"git://github.com/andreaseriksson/btfoto.git","ssh_url":"git@github.com:andreaseriksson/btfoto.git","clone_url":"https://github.com/andreaseriksson/btfoto.git","svn_url":"https://github.com/andreaseriksson/btfoto","homepage":null,"size":1628,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"andreaseriksson:master","ref":"master","sha":"b2b3efb9cb6b07e5d458653b5928414a9b47a95a","user":{"login":"andreaseriksson","id":897748,"avatar_url":"https://avatars.githubusercontent.com/u/897748?v=3","gravatar_id":"","url":"https://api.github.com/users/andreaseriksson","html_url":"https://github.com/andreaseriksson","followers_url":"https://api.github.com/users/andreaseriksson/followers","following_url":"https://api.github.com/users/andreaseriksson/following{/other_user}","gists_url":"https://api.github.com/users/andreaseriksson/gists{/gist_id}","starred_url":"https://api.github.com/users/andreaseriksson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreaseriksson/subscriptions","organizations_url":"https://api.github.com/users/andreaseriksson/orgs","repos_url":"https://api.github.com/users/andreaseriksson/repos","events_url":"https://api.github.com/users/andreaseriksson/events{/privacy}","received_events_url":"https://api.github.com/users/andreaseriksson/received_events","type":"User","site_admin":false},"repo":{"id":12195033,"name":"btfoto","full_name":"andreaseriksson/btfoto","owner":{"login":"andreaseriksson","id":897748,"avatar_url":"https://avatars.githubusercontent.com/u/897748?v=3","gravatar_id":"","url":"https://api.github.com/users/andreaseriksson","html_url":"https://github.com/andreaseriksson","followers_url":"https://api.github.com/users/andreaseriksson/followers","following_url":"https://api.github.com/users/andreaseriksson/following{/other_user}","gists_url":"https://api.github.com/users/andreaseriksson/gists{/gist_id}","starred_url":"https://api.github.com/users/andreaseriksson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreaseriksson/subscriptions","organizations_url":"https://api.github.com/users/andreaseriksson/orgs","repos_url":"https://api.github.com/users/andreaseriksson/repos","events_url":"https://api.github.com/users/andreaseriksson/events{/privacy}","received_events_url":"https://api.github.com/users/andreaseriksson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreaseriksson/btfoto","description":"Repo for www.btfoto.se","fork":false,"url":"https://api.github.com/repos/andreaseriksson/btfoto","forks_url":"https://api.github.com/repos/andreaseriksson/btfoto/forks","keys_url":"https://api.github.com/repos/andreaseriksson/btfoto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreaseriksson/btfoto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreaseriksson/btfoto/teams","hooks_url":"https://api.github.com/repos/andreaseriksson/btfoto/hooks","issue_events_url":"https://api.github.com/repos/andreaseriksson/btfoto/issues/events{/number}","events_url":"https://api.github.com/repos/andreaseriksson/btfoto/events","assignees_url":"https://api.github.com/repos/andreaseriksson/btfoto/assignees{/user}","branches_url":"https://api.github.com/repos/andreaseriksson/btfoto/branches{/branch}","tags_url":"https://api.github.com/repos/andreaseriksson/btfoto/tags","blobs_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreaseriksson/btfoto/statuses/{sha}","languages_url":"https://api.github.com/repos/andreaseriksson/btfoto/languages","stargazers_url":"https://api.github.com/repos/andreaseriksson/btfoto/stargazers","contributors_url":"https://api.github.com/repos/andreaseriksson/btfoto/contributors","subscribers_url":"https://api.github.com/repos/andreaseriksson/btfoto/subscribers","subscription_url":"https://api.github.com/repos/andreaseriksson/btfoto/subscription","commits_url":"https://api.github.com/repos/andreaseriksson/btfoto/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreaseriksson/btfoto/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreaseriksson/btfoto/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreaseriksson/btfoto/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreaseriksson/btfoto/contents/{+path}","compare_url":"https://api.github.com/repos/andreaseriksson/btfoto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreaseriksson/btfoto/merges","archive_url":"https://api.github.com/repos/andreaseriksson/btfoto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreaseriksson/btfoto/downloads","issues_url":"https://api.github.com/repos/andreaseriksson/btfoto/issues{/number}","pulls_url":"https://api.github.com/repos/andreaseriksson/btfoto/pulls{/number}","milestones_url":"https://api.github.com/repos/andreaseriksson/btfoto/milestones{/number}","notifications_url":"https://api.github.com/repos/andreaseriksson/btfoto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreaseriksson/btfoto/labels{/name}","releases_url":"https://api.github.com/repos/andreaseriksson/btfoto/releases{/id}","created_at":"2013-08-18T12:31:54Z","updated_at":"2014-09-21T13:52:52Z","pushed_at":"2015-03-01T19:50:51Z","git_url":"git://github.com/andreaseriksson/btfoto.git","ssh_url":"git@github.com:andreaseriksson/btfoto.git","clone_url":"https://github.com/andreaseriksson/btfoto.git","svn_url":"https://github.com/andreaseriksson/btfoto","homepage":null,"size":1628,"stargazers_count":0,"watchers_count":0,"language":"CSS","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/andreaseriksson/btfoto/pulls/1"},"html":{"href":"https://github.com/andreaseriksson/btfoto/pull/1"},"issue":{"href":"https://api.github.com/repos/andreaseriksson/btfoto/issues/1"},"comments":{"href":"https://api.github.com/repos/andreaseriksson/btfoto/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andreaseriksson/btfoto/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/andreaseriksson/btfoto/statuses/21ef3631142857385a9f8470b2ca9d8f0744d69c"}}}}