{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/ffn_03/pulls/comments/70370606","id":70370606,"diff_hunk":"@@ -16,13 +21,34 @@ def create\n     end\n   end\n \n+  def edit\n+  end\n+\n+  def update\n+    if @news.update_attributes news_params\n+      flash[:success] = t \".success\"\n+      redirect_to admin_news_index_path\n+    else\n+      load_news_types\n+      render :edit\n+    end\n+  end\n+\n   private\n   def news_params\n     params.require(:news).permit :title, :news_type_id, :brief_description,\n-      :content, :author, :user_id\n+      :represent_image, :content, :author, :user_id\n   end\n \n   def load_news_types\n     @news_types = NewsType.all.map {|news_type| [news_type.name, news_type.id]}\n   end\n+\n+  def load_news\n+    @news = News.find_by id: params[:id]\n+    unless @news\n+      flash[:danger] = \"\"","path":"app/controllers/admin/news_controller.rb","position":43,"original_position":43,"commit_id":"478fb2f778a28d4359a46c8411401298ab0434c5","original_commit_id":"478fb2f778a28d4359a46c8411401298ab0434c5","user":{"login":"dogiadat","id":11146493,"avatar_url":"https://avatars.githubusercontent.com/u/11146493?v=3","gravatar_id":"","url":"https://api.github.com/users/dogiadat","html_url":"https://github.com/dogiadat","followers_url":"https://api.github.com/users/dogiadat/followers","following_url":"https://api.github.com/users/dogiadat/following{/other_user}","gists_url":"https://api.github.com/users/dogiadat/gists{/gist_id}","starred_url":"https://api.github.com/users/dogiadat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dogiadat/subscriptions","organizations_url":"https://api.github.com/users/dogiadat/orgs","repos_url":"https://api.github.com/users/dogiadat/repos","events_url":"https://api.github.com/users/dogiadat/events{/privacy}","received_events_url":"https://api.github.com/users/dogiadat/received_events","type":"User","site_admin":false},"body":"????","created_at":"2016-07-12T02:53:56Z","updated_at":"2016-07-12T02:53:56Z","html_url":"https://github.com/framgia/ffn_03/pull/11#discussion_r70370606","pull_request_url":"https://api.github.com/repos/framgia/ffn_03/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/framgia/ffn_03/pulls/comments/70370606"},"html":{"href":"https://github.com/framgia/ffn_03/pull/11#discussion_r70370606"},"pull_request":{"href":"https://api.github.com/repos/framgia/ffn_03/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/ffn_03/pulls/11","id":76944471,"html_url":"https://github.com/framgia/ffn_03/pull/11","diff_url":"https://github.com/framgia/ffn_03/pull/11.diff","patch_url":"https://github.com/framgia/ffn_03/pull/11.patch","issue_url":"https://api.github.com/repos/framgia/ffn_03/issues/11","number":11,"state":"open","locked":false,"title":"admin edit news","user":{"login":"nguyenluc312","id":19769129,"avatar_url":"https://avatars.githubusercontent.com/u/19769129?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenluc312","html_url":"https://github.com/nguyenluc312","followers_url":"https://api.github.com/users/nguyenluc312/followers","following_url":"https://api.github.com/users/nguyenluc312/following{/other_user}","gists_url":"https://api.github.com/users/nguyenluc312/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenluc312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenluc312/subscriptions","organizations_url":"https://api.github.com/users/nguyenluc312/orgs","repos_url":"https://api.github.com/users/nguyenluc312/repos","events_url":"https://api.github.com/users/nguyenluc312/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenluc312/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-11T12:23:39Z","updated_at":"2016-07-12T02:53:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ddf966ff954603e14e96e7c9b780c66a8e7b561","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/ffn_03/pulls/11/commits","review_comments_url":"https://api.github.com/repos/framgia/ffn_03/pulls/11/comments","review_comment_url":"https://api.github.com/repos/framgia/ffn_03/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/ffn_03/issues/11/comments","statuses_url":"https://api.github.com/repos/framgia/ffn_03/statuses/478fb2f778a28d4359a46c8411401298ab0434c5","head":{"label":"nguyenluc312:admin-edit-news","ref":"admin-edit-news","sha":"478fb2f778a28d4359a46c8411401298ab0434c5","user":{"login":"nguyenluc312","id":19769129,"avatar_url":"https://avatars.githubusercontent.com/u/19769129?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenluc312","html_url":"https://github.com/nguyenluc312","followers_url":"https://api.github.com/users/nguyenluc312/followers","following_url":"https://api.github.com/users/nguyenluc312/following{/other_user}","gists_url":"https://api.github.com/users/nguyenluc312/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenluc312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenluc312/subscriptions","organizations_url":"https://api.github.com/users/nguyenluc312/orgs","repos_url":"https://api.github.com/users/nguyenluc312/repos","events_url":"https://api.github.com/users/nguyenluc312/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenluc312/received_events","type":"User","site_admin":false},"repo":{"id":62763718,"name":"ffn_03","full_name":"nguyenluc312/ffn_03","owner":{"login":"nguyenluc312","id":19769129,"avatar_url":"https://avatars.githubusercontent.com/u/19769129?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenluc312","html_url":"https://github.com/nguyenluc312","followers_url":"https://api.github.com/users/nguyenluc312/followers","following_url":"https://api.github.com/users/nguyenluc312/following{/other_user}","gists_url":"https://api.github.com/users/nguyenluc312/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenluc312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenluc312/subscriptions","organizations_url":"https://api.github.com/users/nguyenluc312/orgs","repos_url":"https://api.github.com/users/nguyenluc312/repos","events_url":"https://api.github.com/users/nguyenluc312/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenluc312/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nguyenluc312/ffn_03","description":"Framgia Football News (training)","fork":true,"url":"https://api.github.com/repos/nguyenluc312/ffn_03","forks_url":"https://api.github.com/repos/nguyenluc312/ffn_03/forks","keys_url":"https://api.github.com/repos/nguyenluc312/ffn_03/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nguyenluc312/ffn_03/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nguyenluc312/ffn_03/teams","hooks_url":"https://api.github.com/repos/nguyenluc312/ffn_03/hooks","issue_events_url":"https://api.github.com/repos/nguyenluc312/ffn_03/issues/events{/number}","events_url":"https://api.github.com/repos/nguyenluc312/ffn_03/events","assignees_url":"https://api.github.com/repos/nguyenluc312/ffn_03/assignees{/user}","branches_url":"https://api.github.com/repos/nguyenluc312/ffn_03/branches{/branch}","tags_url":"https://api.github.com/repos/nguyenluc312/ffn_03/tags","blobs_url":"https://api.github.com/repos/nguyenluc312/ffn_03/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nguyenluc312/ffn_03/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nguyenluc312/ffn_03/git/refs{/sha}","trees_url":"https://api.github.com/repos/nguyenluc312/ffn_03/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nguyenluc312/ffn_03/statuses/{sha}","languages_url":"https://api.github.com/repos/nguyenluc312/ffn_03/languages","stargazers_url":"https://api.github.com/repos/nguyenluc312/ffn_03/stargazers","contributors_url":"https://api.github.com/repos/nguyenluc312/ffn_03/contributors","subscribers_url":"https://api.github.com/repos/nguyenluc312/ffn_03/subscribers","subscription_url":"https://api.github.com/repos/nguyenluc312/ffn_03/subscription","commits_url":"https://api.github.com/repos/nguyenluc312/ffn_03/commits{/sha}","git_commits_url":"https://api.github.com/repos/nguyenluc312/ffn_03/git/commits{/sha}","comments_url":"https://api.github.com/repos/nguyenluc312/ffn_03/comments{/number}","issue_comment_url":"https://api.github.com/repos/nguyenluc312/ffn_03/issues/comments{/number}","contents_url":"https://api.github.com/repos/nguyenluc312/ffn_03/contents/{+path}","compare_url":"https://api.github.com/repos/nguyenluc312/ffn_03/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nguyenluc312/ffn_03/merges","archive_url":"https://api.github.com/repos/nguyenluc312/ffn_03/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nguyenluc312/ffn_03/downloads","issues_url":"https://api.github.com/repos/nguyenluc312/ffn_03/issues{/number}","pulls_url":"https://api.github.com/repos/nguyenluc312/ffn_03/pulls{/number}","milestones_url":"https://api.github.com/repos/nguyenluc312/ffn_03/milestones{/number}","notifications_url":"https://api.github.com/repos/nguyenluc312/ffn_03/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nguyenluc312/ffn_03/labels{/name}","releases_url":"https://api.github.com/repos/nguyenluc312/ffn_03/releases{/id}","deployments_url":"https://api.github.com/repos/nguyenluc312/ffn_03/deployments","created_at":"2016-07-07T01:05:36Z","updated_at":"2016-07-05T01:29:05Z","pushed_at":"2016-07-12T00:53:11Z","git_url":"git://github.com/nguyenluc312/ffn_03.git","ssh_url":"git@github.com:nguyenluc312/ffn_03.git","clone_url":"https://github.com/nguyenluc312/ffn_03.git","svn_url":"https://github.com/nguyenluc312/ffn_03","homepage":null,"size":69,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"0ddc45c2253ff5e8917a33e4f28f6136a33a8c49","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":62596894,"name":"ffn_03","full_name":"framgia/ffn_03","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/ffn_03","description":"Framgia Football News (training)","fork":false,"url":"https://api.github.com/repos/framgia/ffn_03","forks_url":"https://api.github.com/repos/framgia/ffn_03/forks","keys_url":"https://api.github.com/repos/framgia/ffn_03/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/ffn_03/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/ffn_03/teams","hooks_url":"https://api.github.com/repos/framgia/ffn_03/hooks","issue_events_url":"https://api.github.com/repos/framgia/ffn_03/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/ffn_03/events","assignees_url":"https://api.github.com/repos/framgia/ffn_03/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/ffn_03/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/ffn_03/tags","blobs_url":"https://api.github.com/repos/framgia/ffn_03/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/ffn_03/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/ffn_03/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/ffn_03/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/ffn_03/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/ffn_03/languages","stargazers_url":"https://api.github.com/repos/framgia/ffn_03/stargazers","contributors_url":"https://api.github.com/repos/framgia/ffn_03/contributors","subscribers_url":"https://api.github.com/repos/framgia/ffn_03/subscribers","subscription_url":"https://api.github.com/repos/framgia/ffn_03/subscription","commits_url":"https://api.github.com/repos/framgia/ffn_03/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/ffn_03/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/ffn_03/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/ffn_03/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/ffn_03/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/ffn_03/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/ffn_03/merges","archive_url":"https://api.github.com/repos/framgia/ffn_03/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/ffn_03/downloads","issues_url":"https://api.github.com/repos/framgia/ffn_03/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/ffn_03/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/ffn_03/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/ffn_03/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/ffn_03/labels{/name}","releases_url":"https://api.github.com/repos/framgia/ffn_03/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/ffn_03/deployments","created_at":"2016-07-05T01:29:05Z","updated_at":"2016-07-05T01:29:05Z","pushed_at":"2016-07-12T00:53:11Z","git_url":"git://github.com/framgia/ffn_03.git","ssh_url":"git@github.com:framgia/ffn_03.git","clone_url":"https://github.com/framgia/ffn_03.git","svn_url":"https://github.com/framgia/ffn_03","homepage":null,"size":65,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/ffn_03/pulls/11"},"html":{"href":"https://github.com/framgia/ffn_03/pull/11"},"issue":{"href":"https://api.github.com/repos/framgia/ffn_03/issues/11"},"comments":{"href":"https://api.github.com/repos/framgia/ffn_03/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/ffn_03/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/ffn_03/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/ffn_03/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/ffn_03/statuses/478fb2f778a28d4359a46c8411401298ab0434c5"}}}}
{"actor":{"display_login":"dogiadat"}}