{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_215/pulls/comments/91475252","pull_request_review_id":11982766,"id":91475252,"diff_hunk":"@@ -14,23 +15,47 @@ def new\n \n   def create\n     @word = Word.new word_params\n-    if @word.save\n-      respond_to do |format|\n-        format.js\n-      end\n+    @word.save\n+    respond_to do |format|\n+      format.js\n+    end\n+  end\n+\n+  def edit\n+  end\n+\n+  def update\n+    if @word.update_attributes word_params\n+      flash[:success] = t \"controllers.admin.update_success\"\n+      redirect_to new_admin_word_path\n     else\n-      render :new\n+      render :edit\n+    end\n+  end\n+\n+  def destroy\n+    @word.destroy\n+    respond_to do |format|\n+      format.js\n     end\n   end\n \n   private\n   def word_params\n     params.require(:word).permit :content, :category_id,\n-      answers_attributes: [:content, :is_correct]\n+      answers_attributes: [:content, :is_correct, :_destroy, :id]","path":"app/controllers/admin/words_controller.rb","position":46,"original_position":46,"commit_id":"27458fefa5140772727bb8cb21c353e2332ba2e8","original_commit_id":"8f95f4116891a35d5ee70811d5614e3acf792a0e","user":{"login":"hellovietnam93","id":8023606,"avatar_url":"https://avatars.githubusercontent.com/u/8023606?v=3","gravatar_id":"","url":"https://api.github.com/users/hellovietnam93","html_url":"https://github.com/hellovietnam93","followers_url":"https://api.github.com/users/hellovietnam93/followers","following_url":"https://api.github.com/users/hellovietnam93/following{/other_user}","gists_url":"https://api.github.com/users/hellovietnam93/gists{/gist_id}","starred_url":"https://api.github.com/users/hellovietnam93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellovietnam93/subscriptions","organizations_url":"https://api.github.com/users/hellovietnam93/orgs","repos_url":"https://api.github.com/users/hellovietnam93/repos","events_url":"https://api.github.com/users/hellovietnam93/events{/privacy}","received_events_url":"https://api.github.com/users/hellovietnam93/received_events","type":"User","site_admin":false},"body":"chưa đủ ","created_at":"2016-12-08T09:28:30Z","updated_at":"2016-12-08T09:28:30Z","html_url":"https://github.com/framgia/fels_215/pull/17#discussion_r91475252","pull_request_url":"https://api.github.com/repos/framgia/fels_215/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_215/pulls/comments/91475252"},"html":{"href":"https://github.com/framgia/fels_215/pull/17#discussion_r91475252"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_215/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_215/pulls/17","id":96962316,"html_url":"https://github.com/framgia/fels_215/pull/17","diff_url":"https://github.com/framgia/fels_215/pull/17.diff","patch_url":"https://github.com/framgia/fels_215/pull/17.patch","issue_url":"https://api.github.com/repos/framgia/fels_215/issues/17","number":17,"state":"open","locked":false,"title":"Fix create, edit, delete word and answer","user":{"login":"dieptran00888","id":17880912,"avatar_url":"https://avatars.githubusercontent.com/u/17880912?v=3","gravatar_id":"","url":"https://api.github.com/users/dieptran00888","html_url":"https://github.com/dieptran00888","followers_url":"https://api.github.com/users/dieptran00888/followers","following_url":"https://api.github.com/users/dieptran00888/following{/other_user}","gists_url":"https://api.github.com/users/dieptran00888/gists{/gist_id}","starred_url":"https://api.github.com/users/dieptran00888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dieptran00888/subscriptions","organizations_url":"https://api.github.com/users/dieptran00888/orgs","repos_url":"https://api.github.com/users/dieptran00888/repos","events_url":"https://api.github.com/users/dieptran00888/events{/privacy}","received_events_url":"https://api.github.com/users/dieptran00888/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-07T16:50:21Z","updated_at":"2016-12-08T09:28:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"374d8c5d241dfd64c85e3e857810edcee603cb36","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_215/pulls/17/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_215/pulls/17/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_215/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_215/issues/17/comments","statuses_url":"https://api.github.com/repos/framgia/fels_215/statuses/27458fefa5140772727bb8cb21c353e2332ba2e8","head":{"label":"dieptran00888:fix-create-word-answer","ref":"fix-create-word-answer","sha":"27458fefa5140772727bb8cb21c353e2332ba2e8","user":{"login":"dieptran00888","id":17880912,"avatar_url":"https://avatars.githubusercontent.com/u/17880912?v=3","gravatar_id":"","url":"https://api.github.com/users/dieptran00888","html_url":"https://github.com/dieptran00888","followers_url":"https://api.github.com/users/dieptran00888/followers","following_url":"https://api.github.com/users/dieptran00888/following{/other_user}","gists_url":"https://api.github.com/users/dieptran00888/gists{/gist_id}","starred_url":"https://api.github.com/users/dieptran00888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dieptran00888/subscriptions","organizations_url":"https://api.github.com/users/dieptran00888/orgs","repos_url":"https://api.github.com/users/dieptran00888/repos","events_url":"https://api.github.com/users/dieptran00888/events{/privacy}","received_events_url":"https://api.github.com/users/dieptran00888/received_events","type":"User","site_admin":false},"repo":{"id":74436446,"name":"fels_215","full_name":"dieptran00888/fels_215","owner":{"login":"dieptran00888","id":17880912,"avatar_url":"https://avatars.githubusercontent.com/u/17880912?v=3","gravatar_id":"","url":"https://api.github.com/users/dieptran00888","html_url":"https://github.com/dieptran00888","followers_url":"https://api.github.com/users/dieptran00888/followers","following_url":"https://api.github.com/users/dieptran00888/following{/other_user}","gists_url":"https://api.github.com/users/dieptran00888/gists{/gist_id}","starred_url":"https://api.github.com/users/dieptran00888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dieptran00888/subscriptions","organizations_url":"https://api.github.com/users/dieptran00888/orgs","repos_url":"https://api.github.com/users/dieptran00888/repos","events_url":"https://api.github.com/users/dieptran00888/events{/privacy}","received_events_url":"https://api.github.com/users/dieptran00888/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dieptran00888/fels_215","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/dieptran00888/fels_215","forks_url":"https://api.github.com/repos/dieptran00888/fels_215/forks","keys_url":"https://api.github.com/repos/dieptran00888/fels_215/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dieptran00888/fels_215/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dieptran00888/fels_215/teams","hooks_url":"https://api.github.com/repos/dieptran00888/fels_215/hooks","issue_events_url":"https://api.github.com/repos/dieptran00888/fels_215/issues/events{/number}","events_url":"https://api.github.com/repos/dieptran00888/fels_215/events","assignees_url":"https://api.github.com/repos/dieptran00888/fels_215/assignees{/user}","branches_url":"https://api.github.com/repos/dieptran00888/fels_215/branches{/branch}","tags_url":"https://api.github.com/repos/dieptran00888/fels_215/tags","blobs_url":"https://api.github.com/repos/dieptran00888/fels_215/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dieptran00888/fels_215/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dieptran00888/fels_215/git/refs{/sha}","trees_url":"https://api.github.com/repos/dieptran00888/fels_215/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dieptran00888/fels_215/statuses/{sha}","languages_url":"https://api.github.com/repos/dieptran00888/fels_215/languages","stargazers_url":"https://api.github.com/repos/dieptran00888/fels_215/stargazers","contributors_url":"https://api.github.com/repos/dieptran00888/fels_215/contributors","subscribers_url":"https://api.github.com/repos/dieptran00888/fels_215/subscribers","subscription_url":"https://api.github.com/repos/dieptran00888/fels_215/subscription","commits_url":"https://api.github.com/repos/dieptran00888/fels_215/commits{/sha}","git_commits_url":"https://api.github.com/repos/dieptran00888/fels_215/git/commits{/sha}","comments_url":"https://api.github.com/repos/dieptran00888/fels_215/comments{/number}","issue_comment_url":"https://api.github.com/repos/dieptran00888/fels_215/issues/comments{/number}","contents_url":"https://api.github.com/repos/dieptran00888/fels_215/contents/{+path}","compare_url":"https://api.github.com/repos/dieptran00888/fels_215/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dieptran00888/fels_215/merges","archive_url":"https://api.github.com/repos/dieptran00888/fels_215/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dieptran00888/fels_215/downloads","issues_url":"https://api.github.com/repos/dieptran00888/fels_215/issues{/number}","pulls_url":"https://api.github.com/repos/dieptran00888/fels_215/pulls{/number}","milestones_url":"https://api.github.com/repos/dieptran00888/fels_215/milestones{/number}","notifications_url":"https://api.github.com/repos/dieptran00888/fels_215/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dieptran00888/fels_215/labels{/name}","releases_url":"https://api.github.com/repos/dieptran00888/fels_215/releases{/id}","deployments_url":"https://api.github.com/repos/dieptran00888/fels_215/deployments","created_at":"2016-11-22T05:08:49Z","updated_at":"2016-11-22T01:12:31Z","pushed_at":"2016-12-08T09:25:08Z","git_url":"git://github.com/dieptran00888/fels_215.git","ssh_url":"git@github.com:dieptran00888/fels_215.git","clone_url":"https://github.com/dieptran00888/fels_215.git","svn_url":"https://github.com/dieptran00888/fels_215","homepage":null,"size":586,"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":"3722b1b032c49c35f77c72b62f428c06b2027993","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":74420711,"name":"fels_215","full_name":"framgia/fels_215","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/fels_215","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_215","forks_url":"https://api.github.com/repos/framgia/fels_215/forks","keys_url":"https://api.github.com/repos/framgia/fels_215/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_215/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_215/teams","hooks_url":"https://api.github.com/repos/framgia/fels_215/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_215/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_215/events","assignees_url":"https://api.github.com/repos/framgia/fels_215/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_215/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_215/tags","blobs_url":"https://api.github.com/repos/framgia/fels_215/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_215/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_215/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_215/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_215/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_215/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_215/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_215/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_215/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_215/subscription","commits_url":"https://api.github.com/repos/framgia/fels_215/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_215/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_215/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_215/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_215/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_215/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_215/merges","archive_url":"https://api.github.com/repos/framgia/fels_215/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_215/downloads","issues_url":"https://api.github.com/repos/framgia/fels_215/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_215/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_215/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_215/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_215/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_215/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fels_215/deployments","created_at":"2016-11-22T01:12:31Z","updated_at":"2016-11-22T01:12:31Z","pushed_at":"2016-12-08T09:25:08Z","git_url":"git://github.com/framgia/fels_215.git","ssh_url":"git@github.com:framgia/fels_215.git","clone_url":"https://github.com/framgia/fels_215.git","svn_url":"https://github.com/framgia/fels_215","homepage":null,"size":586,"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/fels_215/pulls/17"},"html":{"href":"https://github.com/framgia/fels_215/pull/17"},"issue":{"href":"https://api.github.com/repos/framgia/fels_215/issues/17"},"comments":{"href":"https://api.github.com/repos/framgia/fels_215/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_215/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_215/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_215/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_215/statuses/27458fefa5140772727bb8cb21c353e2332ba2e8"}}}}
{"actor":{"display_login":"hellovietnam93"}}