{"action":"created","comment":{"url":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/comments/22499805","id":22499805,"diff_hunk":"@@ -0,0 +1,65 @@\n+class PostsController < ApplicationController\n+  # see note at the bottom\n+  # before_action :set_post, only: [:show, :edit, :update, :destroy]\n+\n+  def index\n+    @posts = Post.all\n+  end\n+\n+  def new\n+    @post = Post.new\n+  end\n+\n+  def edit\n+    @post = Post.find(params[:id])\n+  end\n+\n+  def create\n+    @post = Post.create(allowed_params)\n+    # @post.title = params[:post][:title]\n+    # @post.published = params[:post][:published]\n+    # @post.author = params[:post][:author]\n+    # @post.content = params[:post][:content]\n+    # This is equivalent to using rails c and entering\n+    # parameters manualy\n+\n+    # if @post.save\n+    #   redirect_to @post, notice: 'Post was successfully created.'\n+    # else\n+    #   render action: 'new'\n+    # end\n+  end\n+\n+  def show\n+    @post = Post.find(params[:id])\n+  end\n+\n+  def update\n+    @post = Post.find(params[:id], allowed_params)\n+    # if @post.update(allowed_params)\n+    #   redirect_to @post, notice: 'Post was successfully updated.'\n+    # else\n+    #   render action: 'edit'\n+    # end\n+  end\n+\n+  def destroy\n+    @post = Post.find(params[:id])","path":"app/controllers/posts_controller.rb","position":47,"original_position":47,"commit_id":"5e4dda97ff9d1d551ad07f76c36141108994c64f","original_commit_id":"5e4dda97ff9d1d551ad07f76c36141108994c64f","user":{"login":"orendon","id":1316543,"avatar_url":"https://avatars.githubusercontent.com/u/1316543?v=3","gravatar_id":"","url":"https://api.github.com/users/orendon","html_url":"https://github.com/orendon","followers_url":"https://api.github.com/users/orendon/followers","following_url":"https://api.github.com/users/orendon/following{/other_user}","gists_url":"https://api.github.com/users/orendon/gists{/gist_id}","starred_url":"https://api.github.com/users/orendon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orendon/subscriptions","organizations_url":"https://api.github.com/users/orendon/orgs","repos_url":"https://api.github.com/users/orendon/repos","events_url":"https://api.github.com/users/orendon/events{/privacy}","received_events_url":"https://api.github.com/users/orendon/received_events","type":"User","site_admin":false},"body":"DRY, recuerda el `before_action` te sirve para eliminar la duplicidad","created_at":"2015-01-06T00:05:17Z","updated_at":"2015-01-06T00:05:17Z","html_url":"https://github.com/ChrisEstanol/publish-articles/pull/2#discussion_r22499805","pull_request_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/comments/22499805"},"html":{"href":"https://github.com/ChrisEstanol/publish-articles/pull/2#discussion_r22499805"},"pull_request":{"href":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/2","id":26860946,"html_url":"https://github.com/ChrisEstanol/publish-articles/pull/2","diff_url":"https://github.com/ChrisEstanol/publish-articles/pull/2.diff","patch_url":"https://github.com/ChrisEstanol/publish-articles/pull/2.patch","issue_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues/2","number":2,"state":"open","locked":false,"title":"Post bootstrap","user":{"login":"orendon","id":1316543,"avatar_url":"https://avatars.githubusercontent.com/u/1316543?v=3","gravatar_id":"","url":"https://api.github.com/users/orendon","html_url":"https://github.com/orendon","followers_url":"https://api.github.com/users/orendon/followers","following_url":"https://api.github.com/users/orendon/following{/other_user}","gists_url":"https://api.github.com/users/orendon/gists{/gist_id}","starred_url":"https://api.github.com/users/orendon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orendon/subscriptions","organizations_url":"https://api.github.com/users/orendon/orgs","repos_url":"https://api.github.com/users/orendon/repos","events_url":"https://api.github.com/users/orendon/events{/privacy}","received_events_url":"https://api.github.com/users/orendon/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-06T00:03:05Z","updated_at":"2015-01-06T00:05:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bcff8475b1dbe53c958e620e230b6ad57a6ecf35","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues/2/comments","statuses_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/statuses/5e4dda97ff9d1d551ad07f76c36141108994c64f","head":{"label":"ChrisEstanol:post_bootstrap","ref":"post_bootstrap","sha":"5e4dda97ff9d1d551ad07f76c36141108994c64f","user":{"login":"ChrisEstanol","id":7317401,"avatar_url":"https://avatars.githubusercontent.com/u/7317401?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisEstanol","html_url":"https://github.com/ChrisEstanol","followers_url":"https://api.github.com/users/ChrisEstanol/followers","following_url":"https://api.github.com/users/ChrisEstanol/following{/other_user}","gists_url":"https://api.github.com/users/ChrisEstanol/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisEstanol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisEstanol/subscriptions","organizations_url":"https://api.github.com/users/ChrisEstanol/orgs","repos_url":"https://api.github.com/users/ChrisEstanol/repos","events_url":"https://api.github.com/users/ChrisEstanol/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisEstanol/received_events","type":"User","site_admin":false},"repo":{"id":27386820,"name":"publish-articles","full_name":"ChrisEstanol/publish-articles","owner":{"login":"ChrisEstanol","id":7317401,"avatar_url":"https://avatars.githubusercontent.com/u/7317401?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisEstanol","html_url":"https://github.com/ChrisEstanol","followers_url":"https://api.github.com/users/ChrisEstanol/followers","following_url":"https://api.github.com/users/ChrisEstanol/following{/other_user}","gists_url":"https://api.github.com/users/ChrisEstanol/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisEstanol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisEstanol/subscriptions","organizations_url":"https://api.github.com/users/ChrisEstanol/orgs","repos_url":"https://api.github.com/users/ChrisEstanol/repos","events_url":"https://api.github.com/users/ChrisEstanol/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisEstanol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChrisEstanol/publish-articles","description":"","fork":false,"url":"https://api.github.com/repos/ChrisEstanol/publish-articles","forks_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/forks","keys_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/teams","hooks_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/hooks","issue_events_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues/events{/number}","events_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/events","assignees_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/assignees{/user}","branches_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/branches{/branch}","tags_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/tags","blobs_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/statuses/{sha}","languages_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/languages","stargazers_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/stargazers","contributors_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/contributors","subscribers_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/subscribers","subscription_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/subscription","commits_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues/comments/{number}","contents_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/contents/{+path}","compare_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/merges","archive_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/downloads","issues_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues{/number}","pulls_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls{/number}","milestones_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/milestones{/number}","notifications_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/labels{/name}","releases_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/releases{/id}","created_at":"2014-12-01T15:56:30Z","updated_at":"2014-12-01T19:19:49Z","pushed_at":"2014-12-09T15:27:09Z","git_url":"git://github.com/ChrisEstanol/publish-articles.git","ssh_url":"git@github.com:ChrisEstanol/publish-articles.git","clone_url":"https://github.com/ChrisEstanol/publish-articles.git","svn_url":"https://github.com/ChrisEstanol/publish-articles","homepage":null,"size":228,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ChrisEstanol:master","ref":"master","sha":"00e102d62999f1e1090d73c6158a246f95d9afda","user":{"login":"ChrisEstanol","id":7317401,"avatar_url":"https://avatars.githubusercontent.com/u/7317401?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisEstanol","html_url":"https://github.com/ChrisEstanol","followers_url":"https://api.github.com/users/ChrisEstanol/followers","following_url":"https://api.github.com/users/ChrisEstanol/following{/other_user}","gists_url":"https://api.github.com/users/ChrisEstanol/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisEstanol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisEstanol/subscriptions","organizations_url":"https://api.github.com/users/ChrisEstanol/orgs","repos_url":"https://api.github.com/users/ChrisEstanol/repos","events_url":"https://api.github.com/users/ChrisEstanol/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisEstanol/received_events","type":"User","site_admin":false},"repo":{"id":27386820,"name":"publish-articles","full_name":"ChrisEstanol/publish-articles","owner":{"login":"ChrisEstanol","id":7317401,"avatar_url":"https://avatars.githubusercontent.com/u/7317401?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisEstanol","html_url":"https://github.com/ChrisEstanol","followers_url":"https://api.github.com/users/ChrisEstanol/followers","following_url":"https://api.github.com/users/ChrisEstanol/following{/other_user}","gists_url":"https://api.github.com/users/ChrisEstanol/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisEstanol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisEstanol/subscriptions","organizations_url":"https://api.github.com/users/ChrisEstanol/orgs","repos_url":"https://api.github.com/users/ChrisEstanol/repos","events_url":"https://api.github.com/users/ChrisEstanol/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisEstanol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChrisEstanol/publish-articles","description":"","fork":false,"url":"https://api.github.com/repos/ChrisEstanol/publish-articles","forks_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/forks","keys_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/teams","hooks_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/hooks","issue_events_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues/events{/number}","events_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/events","assignees_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/assignees{/user}","branches_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/branches{/branch}","tags_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/tags","blobs_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/statuses/{sha}","languages_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/languages","stargazers_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/stargazers","contributors_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/contributors","subscribers_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/subscribers","subscription_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/subscription","commits_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues/comments/{number}","contents_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/contents/{+path}","compare_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/merges","archive_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/downloads","issues_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues{/number}","pulls_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls{/number}","milestones_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/milestones{/number}","notifications_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/labels{/name}","releases_url":"https://api.github.com/repos/ChrisEstanol/publish-articles/releases{/id}","created_at":"2014-12-01T15:56:30Z","updated_at":"2014-12-01T19:19:49Z","pushed_at":"2014-12-09T15:27:09Z","git_url":"git://github.com/ChrisEstanol/publish-articles.git","ssh_url":"git@github.com:ChrisEstanol/publish-articles.git","clone_url":"https://github.com/ChrisEstanol/publish-articles.git","svn_url":"https://github.com/ChrisEstanol/publish-articles","homepage":null,"size":228,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/2"},"html":{"href":"https://github.com/ChrisEstanol/publish-articles/pull/2"},"issue":{"href":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues/2"},"comments":{"href":"https://api.github.com/repos/ChrisEstanol/publish-articles/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ChrisEstanol/publish-articles/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ChrisEstanol/publish-articles/statuses/5e4dda97ff9d1d551ad07f76c36141108994c64f"}}}}