{"action":"created","comment":{"url":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/comments/27510136","id":27510136,"diff_hunk":"@@ -0,0 +1,51 @@\n+class BeersController < ApplicationController\n+  def new\n+    @beer = Beer.new\n+  end\n+\n+  def create\n+    @beer = Beer.new(beer_params)\n+    if @beer.save\n+      flash[:notice] = \"Beer was saved\"\n+      redirect_to 'beer#show'\n+    else\n+      render 'new'\n+    end\n+  end\n+\n+  def index\n+    @beers = Beer.page(params[:page]).order(:name)\n+  end\n+\n+  def show\n+    @beer = Beer.find(params[:id])\n+  end\n+\n+  def edit\n+    @beer = Beer.find(params[:id])\n+  end\n+\n+  def update\n+    @beer = Beer.find(params[:id])\n+\n+    if @beer.update(beer_params)\n+      flash[:notice] = \"Beer updated\"\n+      redirect_to beers_path(@beer)\n+    else\n+      flash[:notice] = \"Beer was not updated\"\n+      render :edit\n+    end\n+  end\n+\n+  def destroy\n+    Beer.delete(params[:id])\n+    flash[:notice] = \"Beer deleted.\"\n+    redirect_to beers_path\n+  end\n+\n+  protected\n+  ","path":"app/controllers/beers_controller.rb","position":47,"original_position":47,"commit_id":"9b68de2430486283d4adfa581f61e2b696037a07","original_commit_id":"9b68de2430486283d4adfa581f61e2b696037a07","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":"Trailing whitespace detected.","created_at":"2015-03-31T18:47:38Z","updated_at":"2015-03-31T18:47:38Z","html_url":"https://github.com/davidrf/Beer-Reviews/pull/5#discussion_r27510136","pull_request_url":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/comments/27510136"},"html":{"href":"https://github.com/davidrf/Beer-Reviews/pull/5#discussion_r27510136"},"pull_request":{"href":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/5","id":32352757,"html_url":"https://github.com/davidrf/Beer-Reviews/pull/5","diff_url":"https://github.com/davidrf/Beer-Reviews/pull/5.diff","patch_url":"https://github.com/davidrf/Beer-Reviews/pull/5.patch","issue_url":"https://api.github.com/repos/davidrf/Beer-Reviews/issues/5","number":5,"state":"open","locked":false,"title":"WIP Drf Implement Index","user":{"login":"davidrf","id":9678182,"avatar_url":"https://avatars.githubusercontent.com/u/9678182?v=3","gravatar_id":"","url":"https://api.github.com/users/davidrf","html_url":"https://github.com/davidrf","followers_url":"https://api.github.com/users/davidrf/followers","following_url":"https://api.github.com/users/davidrf/following{/other_user}","gists_url":"https://api.github.com/users/davidrf/gists{/gist_id}","starred_url":"https://api.github.com/users/davidrf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidrf/subscriptions","organizations_url":"https://api.github.com/users/davidrf/orgs","repos_url":"https://api.github.com/users/davidrf/repos","events_url":"https://api.github.com/users/davidrf/events{/privacy}","received_events_url":"https://api.github.com/users/davidrf/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-31T18:45:19Z","updated_at":"2015-03-31T18:47:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d8cfa8d32d980cf875d809f87748345d8630f4f2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/5/commits","review_comments_url":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/5/comments","review_comment_url":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/comments{/number}","comments_url":"https://api.github.com/repos/davidrf/Beer-Reviews/issues/5/comments","statuses_url":"https://api.github.com/repos/davidrf/Beer-Reviews/statuses/9b68de2430486283d4adfa581f61e2b696037a07","head":{"label":"davidrf:drf-routes","ref":"drf-routes","sha":"9b68de2430486283d4adfa581f61e2b696037a07","user":{"login":"davidrf","id":9678182,"avatar_url":"https://avatars.githubusercontent.com/u/9678182?v=3","gravatar_id":"","url":"https://api.github.com/users/davidrf","html_url":"https://github.com/davidrf","followers_url":"https://api.github.com/users/davidrf/followers","following_url":"https://api.github.com/users/davidrf/following{/other_user}","gists_url":"https://api.github.com/users/davidrf/gists{/gist_id}","starred_url":"https://api.github.com/users/davidrf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidrf/subscriptions","organizations_url":"https://api.github.com/users/davidrf/orgs","repos_url":"https://api.github.com/users/davidrf/repos","events_url":"https://api.github.com/users/davidrf/events{/privacy}","received_events_url":"https://api.github.com/users/davidrf/received_events","type":"User","site_admin":false},"repo":{"id":33140253,"name":"Beer-Reviews","full_name":"davidrf/Beer-Reviews","owner":{"login":"davidrf","id":9678182,"avatar_url":"https://avatars.githubusercontent.com/u/9678182?v=3","gravatar_id":"","url":"https://api.github.com/users/davidrf","html_url":"https://github.com/davidrf","followers_url":"https://api.github.com/users/davidrf/followers","following_url":"https://api.github.com/users/davidrf/following{/other_user}","gists_url":"https://api.github.com/users/davidrf/gists{/gist_id}","starred_url":"https://api.github.com/users/davidrf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidrf/subscriptions","organizations_url":"https://api.github.com/users/davidrf/orgs","repos_url":"https://api.github.com/users/davidrf/repos","events_url":"https://api.github.com/users/davidrf/events{/privacy}","received_events_url":"https://api.github.com/users/davidrf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidrf/Beer-Reviews","description":"","fork":false,"url":"https://api.github.com/repos/davidrf/Beer-Reviews","forks_url":"https://api.github.com/repos/davidrf/Beer-Reviews/forks","keys_url":"https://api.github.com/repos/davidrf/Beer-Reviews/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidrf/Beer-Reviews/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidrf/Beer-Reviews/teams","hooks_url":"https://api.github.com/repos/davidrf/Beer-Reviews/hooks","issue_events_url":"https://api.github.com/repos/davidrf/Beer-Reviews/issues/events{/number}","events_url":"https://api.github.com/repos/davidrf/Beer-Reviews/events","assignees_url":"https://api.github.com/repos/davidrf/Beer-Reviews/assignees{/user}","branches_url":"https://api.github.com/repos/davidrf/Beer-Reviews/branches{/branch}","tags_url":"https://api.github.com/repos/davidrf/Beer-Reviews/tags","blobs_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidrf/Beer-Reviews/statuses/{sha}","languages_url":"https://api.github.com/repos/davidrf/Beer-Reviews/languages","stargazers_url":"https://api.github.com/repos/davidrf/Beer-Reviews/stargazers","contributors_url":"https://api.github.com/repos/davidrf/Beer-Reviews/contributors","subscribers_url":"https://api.github.com/repos/davidrf/Beer-Reviews/subscribers","subscription_url":"https://api.github.com/repos/davidrf/Beer-Reviews/subscription","commits_url":"https://api.github.com/repos/davidrf/Beer-Reviews/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidrf/Beer-Reviews/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidrf/Beer-Reviews/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidrf/Beer-Reviews/contents/{+path}","compare_url":"https://api.github.com/repos/davidrf/Beer-Reviews/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidrf/Beer-Reviews/merges","archive_url":"https://api.github.com/repos/davidrf/Beer-Reviews/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidrf/Beer-Reviews/downloads","issues_url":"https://api.github.com/repos/davidrf/Beer-Reviews/issues{/number}","pulls_url":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls{/number}","milestones_url":"https://api.github.com/repos/davidrf/Beer-Reviews/milestones{/number}","notifications_url":"https://api.github.com/repos/davidrf/Beer-Reviews/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidrf/Beer-Reviews/labels{/name}","releases_url":"https://api.github.com/repos/davidrf/Beer-Reviews/releases{/id}","created_at":"2015-03-30T18:26:08Z","updated_at":"2015-03-31T18:17:56Z","pushed_at":"2015-03-31T18:47:31Z","git_url":"git://github.com/davidrf/Beer-Reviews.git","ssh_url":"git@github.com:davidrf/Beer-Reviews.git","clone_url":"https://github.com/davidrf/Beer-Reviews.git","svn_url":"https://github.com/davidrf/Beer-Reviews","homepage":null,"size":0,"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":"davidrf:master","ref":"master","sha":"d3331d4727b0544d75d55b6af9bcb5f93792e5e9","user":{"login":"davidrf","id":9678182,"avatar_url":"https://avatars.githubusercontent.com/u/9678182?v=3","gravatar_id":"","url":"https://api.github.com/users/davidrf","html_url":"https://github.com/davidrf","followers_url":"https://api.github.com/users/davidrf/followers","following_url":"https://api.github.com/users/davidrf/following{/other_user}","gists_url":"https://api.github.com/users/davidrf/gists{/gist_id}","starred_url":"https://api.github.com/users/davidrf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidrf/subscriptions","organizations_url":"https://api.github.com/users/davidrf/orgs","repos_url":"https://api.github.com/users/davidrf/repos","events_url":"https://api.github.com/users/davidrf/events{/privacy}","received_events_url":"https://api.github.com/users/davidrf/received_events","type":"User","site_admin":false},"repo":{"id":33140253,"name":"Beer-Reviews","full_name":"davidrf/Beer-Reviews","owner":{"login":"davidrf","id":9678182,"avatar_url":"https://avatars.githubusercontent.com/u/9678182?v=3","gravatar_id":"","url":"https://api.github.com/users/davidrf","html_url":"https://github.com/davidrf","followers_url":"https://api.github.com/users/davidrf/followers","following_url":"https://api.github.com/users/davidrf/following{/other_user}","gists_url":"https://api.github.com/users/davidrf/gists{/gist_id}","starred_url":"https://api.github.com/users/davidrf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidrf/subscriptions","organizations_url":"https://api.github.com/users/davidrf/orgs","repos_url":"https://api.github.com/users/davidrf/repos","events_url":"https://api.github.com/users/davidrf/events{/privacy}","received_events_url":"https://api.github.com/users/davidrf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidrf/Beer-Reviews","description":"","fork":false,"url":"https://api.github.com/repos/davidrf/Beer-Reviews","forks_url":"https://api.github.com/repos/davidrf/Beer-Reviews/forks","keys_url":"https://api.github.com/repos/davidrf/Beer-Reviews/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidrf/Beer-Reviews/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidrf/Beer-Reviews/teams","hooks_url":"https://api.github.com/repos/davidrf/Beer-Reviews/hooks","issue_events_url":"https://api.github.com/repos/davidrf/Beer-Reviews/issues/events{/number}","events_url":"https://api.github.com/repos/davidrf/Beer-Reviews/events","assignees_url":"https://api.github.com/repos/davidrf/Beer-Reviews/assignees{/user}","branches_url":"https://api.github.com/repos/davidrf/Beer-Reviews/branches{/branch}","tags_url":"https://api.github.com/repos/davidrf/Beer-Reviews/tags","blobs_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidrf/Beer-Reviews/statuses/{sha}","languages_url":"https://api.github.com/repos/davidrf/Beer-Reviews/languages","stargazers_url":"https://api.github.com/repos/davidrf/Beer-Reviews/stargazers","contributors_url":"https://api.github.com/repos/davidrf/Beer-Reviews/contributors","subscribers_url":"https://api.github.com/repos/davidrf/Beer-Reviews/subscribers","subscription_url":"https://api.github.com/repos/davidrf/Beer-Reviews/subscription","commits_url":"https://api.github.com/repos/davidrf/Beer-Reviews/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidrf/Beer-Reviews/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidrf/Beer-Reviews/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidrf/Beer-Reviews/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidrf/Beer-Reviews/contents/{+path}","compare_url":"https://api.github.com/repos/davidrf/Beer-Reviews/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidrf/Beer-Reviews/merges","archive_url":"https://api.github.com/repos/davidrf/Beer-Reviews/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidrf/Beer-Reviews/downloads","issues_url":"https://api.github.com/repos/davidrf/Beer-Reviews/issues{/number}","pulls_url":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls{/number}","milestones_url":"https://api.github.com/repos/davidrf/Beer-Reviews/milestones{/number}","notifications_url":"https://api.github.com/repos/davidrf/Beer-Reviews/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidrf/Beer-Reviews/labels{/name}","releases_url":"https://api.github.com/repos/davidrf/Beer-Reviews/releases{/id}","created_at":"2015-03-30T18:26:08Z","updated_at":"2015-03-31T18:17:56Z","pushed_at":"2015-03-31T18:47:31Z","git_url":"git://github.com/davidrf/Beer-Reviews.git","ssh_url":"git@github.com:davidrf/Beer-Reviews.git","clone_url":"https://github.com/davidrf/Beer-Reviews.git","svn_url":"https://github.com/davidrf/Beer-Reviews","homepage":null,"size":0,"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/davidrf/Beer-Reviews/pulls/5"},"html":{"href":"https://github.com/davidrf/Beer-Reviews/pull/5"},"issue":{"href":"https://api.github.com/repos/davidrf/Beer-Reviews/issues/5"},"comments":{"href":"https://api.github.com/repos/davidrf/Beer-Reviews/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/davidrf/Beer-Reviews/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/davidrf/Beer-Reviews/statuses/9b68de2430486283d4adfa581f61e2b696037a07"}}}}