{"action":"created","comment":{"url":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/comments/22483854","id":22483854,"diff_hunk":"@@ -0,0 +1,53 @@\n+class ArticlesController < ApplicationController\n+\n+  def new\n+    @article = Article.new\n+    @titulo = \"Nuevo Articulo\"\n+  end\n+\n+  def create\n+    @article = Article.new(article_params)\n+    if @article.save\n+      render 'create'\n+    else\n+      @titulo = \"Nuevo Articulo\"\n+      render 'new'\n+    end\n+  end\n+\n+  def show\n+    @article = Article.find(params[:id])\n+  end\n+\n+  def index\n+    @articles = Article.all.order(created_at: :desc)\n+  end\n+\n+  def edit\n+    @article = Article.find(params[:id])\n+    @titulo = \"Editar Articulo\"\n+  end\n+\n+  def update\n+    @article = Article.find(params[:id])\n+    if @article.update(article_params)\n+      render 'update'\n+    else\n+      @titulo = \"Editar Articulo\"\n+      render 'edit'\n+    end\n+  end\n+\n+  def destroy\n+    @article = Article.find(params[:id])","path":"app/controllers/articles_controller.rb","position":42,"original_position":42,"commit_id":"c13e565aed0b3dc25ecca527b5f218f1a50de7df","original_commit_id":"c13e565aed0b3dc25ecca527b5f218f1a50de7df","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, acordate de los `before_action`para evitar esta duplicidad","created_at":"2015-01-05T19:39:54Z","updated_at":"2015-01-05T19:39:54Z","html_url":"https://github.com/danielllano/Articles-Blog/pull/1#discussion_r22483854","pull_request_url":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/comments/22483854"},"html":{"href":"https://github.com/danielllano/Articles-Blog/pull/1#discussion_r22483854"},"pull_request":{"href":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/1","id":26005665,"html_url":"https://github.com/danielllano/Articles-Blog/pull/1","diff_url":"https://github.com/danielllano/Articles-Blog/pull/1.diff","patch_url":"https://github.com/danielllano/Articles-Blog/pull/1.patch","issue_url":"https://api.github.com/repos/danielllano/Articles-Blog/issues/1","number":1,"state":"open","locked":false,"title":"Parte 1","user":{"login":"danielllano","id":9059825,"avatar_url":"https://avatars.githubusercontent.com/u/9059825?v=3","gravatar_id":"","url":"https://api.github.com/users/danielllano","html_url":"https://github.com/danielllano","followers_url":"https://api.github.com/users/danielllano/followers","following_url":"https://api.github.com/users/danielllano/following{/other_user}","gists_url":"https://api.github.com/users/danielllano/gists{/gist_id}","starred_url":"https://api.github.com/users/danielllano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielllano/subscriptions","organizations_url":"https://api.github.com/users/danielllano/orgs","repos_url":"https://api.github.com/users/danielllano/repos","events_url":"https://api.github.com/users/danielllano/events{/privacy}","received_events_url":"https://api.github.com/users/danielllano/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-12-12T21:54:42Z","updated_at":"2015-01-05T19:39:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64e167300dc009226e8081266319fafa9504c48e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/1/commits","review_comments_url":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/1/comments","review_comment_url":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/comments/{number}","comments_url":"https://api.github.com/repos/danielllano/Articles-Blog/issues/1/comments","statuses_url":"https://api.github.com/repos/danielllano/Articles-Blog/statuses/c13e565aed0b3dc25ecca527b5f218f1a50de7df","head":{"label":"danielllano:parte-1","ref":"parte-1","sha":"c13e565aed0b3dc25ecca527b5f218f1a50de7df","user":{"login":"danielllano","id":9059825,"avatar_url":"https://avatars.githubusercontent.com/u/9059825?v=3","gravatar_id":"","url":"https://api.github.com/users/danielllano","html_url":"https://github.com/danielllano","followers_url":"https://api.github.com/users/danielllano/followers","following_url":"https://api.github.com/users/danielllano/following{/other_user}","gists_url":"https://api.github.com/users/danielllano/gists{/gist_id}","starred_url":"https://api.github.com/users/danielllano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielllano/subscriptions","organizations_url":"https://api.github.com/users/danielllano/orgs","repos_url":"https://api.github.com/users/danielllano/repos","events_url":"https://api.github.com/users/danielllano/events{/privacy}","received_events_url":"https://api.github.com/users/danielllano/received_events","type":"User","site_admin":false},"repo":{"id":27939427,"name":"Articles-Blog","full_name":"danielllano/Articles-Blog","owner":{"login":"danielllano","id":9059825,"avatar_url":"https://avatars.githubusercontent.com/u/9059825?v=3","gravatar_id":"","url":"https://api.github.com/users/danielllano","html_url":"https://github.com/danielllano","followers_url":"https://api.github.com/users/danielllano/followers","following_url":"https://api.github.com/users/danielllano/following{/other_user}","gists_url":"https://api.github.com/users/danielllano/gists{/gist_id}","starred_url":"https://api.github.com/users/danielllano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielllano/subscriptions","organizations_url":"https://api.github.com/users/danielllano/orgs","repos_url":"https://api.github.com/users/danielllano/repos","events_url":"https://api.github.com/users/danielllano/events{/privacy}","received_events_url":"https://api.github.com/users/danielllano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielllano/Articles-Blog","description":"","fork":false,"url":"https://api.github.com/repos/danielllano/Articles-Blog","forks_url":"https://api.github.com/repos/danielllano/Articles-Blog/forks","keys_url":"https://api.github.com/repos/danielllano/Articles-Blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielllano/Articles-Blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielllano/Articles-Blog/teams","hooks_url":"https://api.github.com/repos/danielllano/Articles-Blog/hooks","issue_events_url":"https://api.github.com/repos/danielllano/Articles-Blog/issues/events{/number}","events_url":"https://api.github.com/repos/danielllano/Articles-Blog/events","assignees_url":"https://api.github.com/repos/danielllano/Articles-Blog/assignees{/user}","branches_url":"https://api.github.com/repos/danielllano/Articles-Blog/branches{/branch}","tags_url":"https://api.github.com/repos/danielllano/Articles-Blog/tags","blobs_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielllano/Articles-Blog/statuses/{sha}","languages_url":"https://api.github.com/repos/danielllano/Articles-Blog/languages","stargazers_url":"https://api.github.com/repos/danielllano/Articles-Blog/stargazers","contributors_url":"https://api.github.com/repos/danielllano/Articles-Blog/contributors","subscribers_url":"https://api.github.com/repos/danielllano/Articles-Blog/subscribers","subscription_url":"https://api.github.com/repos/danielllano/Articles-Blog/subscription","commits_url":"https://api.github.com/repos/danielllano/Articles-Blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielllano/Articles-Blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielllano/Articles-Blog/issues/comments/{number}","contents_url":"https://api.github.com/repos/danielllano/Articles-Blog/contents/{+path}","compare_url":"https://api.github.com/repos/danielllano/Articles-Blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielllano/Articles-Blog/merges","archive_url":"https://api.github.com/repos/danielllano/Articles-Blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielllano/Articles-Blog/downloads","issues_url":"https://api.github.com/repos/danielllano/Articles-Blog/issues{/number}","pulls_url":"https://api.github.com/repos/danielllano/Articles-Blog/pulls{/number}","milestones_url":"https://api.github.com/repos/danielllano/Articles-Blog/milestones{/number}","notifications_url":"https://api.github.com/repos/danielllano/Articles-Blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielllano/Articles-Blog/labels{/name}","releases_url":"https://api.github.com/repos/danielllano/Articles-Blog/releases{/id}","created_at":"2014-12-12T21:46:43Z","updated_at":"2014-12-12T21:49:24Z","pushed_at":"2014-12-18T17:06:30Z","git_url":"git://github.com/danielllano/Articles-Blog.git","ssh_url":"git@github.com:danielllano/Articles-Blog.git","clone_url":"https://github.com/danielllano/Articles-Blog.git","svn_url":"https://github.com/danielllano/Articles-Blog","homepage":null,"size":236,"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":"danielllano:master","ref":"master","sha":"f350e8f9b561d7f91db5c32e42073c29190143f5","user":{"login":"danielllano","id":9059825,"avatar_url":"https://avatars.githubusercontent.com/u/9059825?v=3","gravatar_id":"","url":"https://api.github.com/users/danielllano","html_url":"https://github.com/danielllano","followers_url":"https://api.github.com/users/danielllano/followers","following_url":"https://api.github.com/users/danielllano/following{/other_user}","gists_url":"https://api.github.com/users/danielllano/gists{/gist_id}","starred_url":"https://api.github.com/users/danielllano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielllano/subscriptions","organizations_url":"https://api.github.com/users/danielllano/orgs","repos_url":"https://api.github.com/users/danielllano/repos","events_url":"https://api.github.com/users/danielllano/events{/privacy}","received_events_url":"https://api.github.com/users/danielllano/received_events","type":"User","site_admin":false},"repo":{"id":27939427,"name":"Articles-Blog","full_name":"danielllano/Articles-Blog","owner":{"login":"danielllano","id":9059825,"avatar_url":"https://avatars.githubusercontent.com/u/9059825?v=3","gravatar_id":"","url":"https://api.github.com/users/danielllano","html_url":"https://github.com/danielllano","followers_url":"https://api.github.com/users/danielllano/followers","following_url":"https://api.github.com/users/danielllano/following{/other_user}","gists_url":"https://api.github.com/users/danielllano/gists{/gist_id}","starred_url":"https://api.github.com/users/danielllano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielllano/subscriptions","organizations_url":"https://api.github.com/users/danielllano/orgs","repos_url":"https://api.github.com/users/danielllano/repos","events_url":"https://api.github.com/users/danielllano/events{/privacy}","received_events_url":"https://api.github.com/users/danielllano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielllano/Articles-Blog","description":"","fork":false,"url":"https://api.github.com/repos/danielllano/Articles-Blog","forks_url":"https://api.github.com/repos/danielllano/Articles-Blog/forks","keys_url":"https://api.github.com/repos/danielllano/Articles-Blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielllano/Articles-Blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielllano/Articles-Blog/teams","hooks_url":"https://api.github.com/repos/danielllano/Articles-Blog/hooks","issue_events_url":"https://api.github.com/repos/danielllano/Articles-Blog/issues/events{/number}","events_url":"https://api.github.com/repos/danielllano/Articles-Blog/events","assignees_url":"https://api.github.com/repos/danielllano/Articles-Blog/assignees{/user}","branches_url":"https://api.github.com/repos/danielllano/Articles-Blog/branches{/branch}","tags_url":"https://api.github.com/repos/danielllano/Articles-Blog/tags","blobs_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielllano/Articles-Blog/statuses/{sha}","languages_url":"https://api.github.com/repos/danielllano/Articles-Blog/languages","stargazers_url":"https://api.github.com/repos/danielllano/Articles-Blog/stargazers","contributors_url":"https://api.github.com/repos/danielllano/Articles-Blog/contributors","subscribers_url":"https://api.github.com/repos/danielllano/Articles-Blog/subscribers","subscription_url":"https://api.github.com/repos/danielllano/Articles-Blog/subscription","commits_url":"https://api.github.com/repos/danielllano/Articles-Blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielllano/Articles-Blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielllano/Articles-Blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielllano/Articles-Blog/issues/comments/{number}","contents_url":"https://api.github.com/repos/danielllano/Articles-Blog/contents/{+path}","compare_url":"https://api.github.com/repos/danielllano/Articles-Blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielllano/Articles-Blog/merges","archive_url":"https://api.github.com/repos/danielllano/Articles-Blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielllano/Articles-Blog/downloads","issues_url":"https://api.github.com/repos/danielllano/Articles-Blog/issues{/number}","pulls_url":"https://api.github.com/repos/danielllano/Articles-Blog/pulls{/number}","milestones_url":"https://api.github.com/repos/danielllano/Articles-Blog/milestones{/number}","notifications_url":"https://api.github.com/repos/danielllano/Articles-Blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielllano/Articles-Blog/labels{/name}","releases_url":"https://api.github.com/repos/danielllano/Articles-Blog/releases{/id}","created_at":"2014-12-12T21:46:43Z","updated_at":"2014-12-12T21:49:24Z","pushed_at":"2014-12-18T17:06:30Z","git_url":"git://github.com/danielllano/Articles-Blog.git","ssh_url":"git@github.com:danielllano/Articles-Blog.git","clone_url":"https://github.com/danielllano/Articles-Blog.git","svn_url":"https://github.com/danielllano/Articles-Blog","homepage":null,"size":236,"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/danielllano/Articles-Blog/pulls/1"},"html":{"href":"https://github.com/danielllano/Articles-Blog/pull/1"},"issue":{"href":"https://api.github.com/repos/danielllano/Articles-Blog/issues/1"},"comments":{"href":"https://api.github.com/repos/danielllano/Articles-Blog/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/danielllano/Articles-Blog/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/danielllano/Articles-Blog/statuses/c13e565aed0b3dc25ecca527b5f218f1a50de7df"}}}}