{"action":"created","comment":{"url":"https://api.github.com/repos/awesome-academy/training_management/pulls/comments/174429983","pull_request_review_id":103780308,"id":174429983,"diff_hunk":"@@ -1,45 +1,56 @@\n class SubjectsController < ApplicationController\n-  before_action :find_subject, only: [:update, :show]\n+  before_action :find_subject, only: [:update, :show, :edit, :destroy]\n \n   def index\n     @subjects = Subject.all.order(:subject_name).paginate(page: params[:page], per_page: Settings.page.maximum)\n   end\n \n   def new\n     @subject = Subject.new\n-    @task = Task.new\n   end\n \n   def create\n-    @subjects = Subject.new subject_params\n+    @subject = Subject.new subject_params\n \n-    if @subjects.save\n-      flash[:success] = t \"admin.subjects.new.success\"\n+    if @subject.save\n+      flash[:success] = t \"admin.subjects.new.success_create\"\n       redirect_to subjects_path\n-    else\n-      redirect_to subject_new_path\n+    else redirect_to subjects_path\n     end\n   end\n \n+  def edit\n+  end\n+\n   def update\n+    if @subject.update_attributes(subject_params)","path":"app/controllers/subjects_controller.rb","position":33,"original_position":33,"commit_id":"f4800b9701d9a0b4e888e3bdf55d228c4a0dcb44","original_commit_id":"2add721ff84901ceea50bfe4ace66aab37308e27","user":{"login":"huongnguyenmta","id":18224922,"avatar_url":"https://avatars3.githubusercontent.com/u/18224922?v=4","gravatar_id":"","url":"https://api.github.com/users/huongnguyenmta","html_url":"https://github.com/huongnguyenmta","followers_url":"https://api.github.com/users/huongnguyenmta/followers","following_url":"https://api.github.com/users/huongnguyenmta/following{/other_user}","gists_url":"https://api.github.com/users/huongnguyenmta/gists{/gist_id}","starred_url":"https://api.github.com/users/huongnguyenmta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huongnguyenmta/subscriptions","organizations_url":"https://api.github.com/users/huongnguyenmta/orgs","repos_url":"https://api.github.com/users/huongnguyenmta/repos","events_url":"https://api.github.com/users/huongnguyenmta/events{/privacy}","received_events_url":"https://api.github.com/users/huongnguyenmta/received_events","type":"User","site_admin":false},"body":"bỏ ngoặc","created_at":"2018-03-14T11:37:09Z","updated_at":"2018-03-14T11:51:49Z","html_url":"https://github.com/awesome-academy/training_management/pull/10#discussion_r174429983","pull_request_url":"https://api.github.com/repos/awesome-academy/training_management/pulls/10","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/awesome-academy/training_management/pulls/comments/174429983"},"html":{"href":"https://github.com/awesome-academy/training_management/pull/10#discussion_r174429983"},"pull_request":{"href":"https://api.github.com/repos/awesome-academy/training_management/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/awesome-academy/training_management/pulls/10","id":174015086,"html_url":"https://github.com/awesome-academy/training_management/pull/10","diff_url":"https://github.com/awesome-academy/training_management/pull/10.diff","patch_url":"https://github.com/awesome-academy/training_management/pull/10.patch","issue_url":"https://api.github.com/repos/awesome-academy/training_management/issues/10","number":10,"state":"open","locked":false,"title":"Edit subject","user":{"login":"nguyenvu1892","id":22019661,"avatar_url":"https://avatars1.githubusercontent.com/u/22019661?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenvu1892","html_url":"https://github.com/nguyenvu1892","followers_url":"https://api.github.com/users/nguyenvu1892/followers","following_url":"https://api.github.com/users/nguyenvu1892/following{/other_user}","gists_url":"https://api.github.com/users/nguyenvu1892/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenvu1892/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenvu1892/subscriptions","organizations_url":"https://api.github.com/users/nguyenvu1892/orgs","repos_url":"https://api.github.com/users/nguyenvu1892/repos","events_url":"https://api.github.com/users/nguyenvu1892/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenvu1892/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-09T14:14:45Z","updated_at":"2018-03-14T11:51:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78efaf6ccbebe6fb639ccf4e9dba0d24d5673225","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/awesome-academy/training_management/pulls/10/commits","review_comments_url":"https://api.github.com/repos/awesome-academy/training_management/pulls/10/comments","review_comment_url":"https://api.github.com/repos/awesome-academy/training_management/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awesome-academy/training_management/issues/10/comments","statuses_url":"https://api.github.com/repos/awesome-academy/training_management/statuses/f4800b9701d9a0b4e888e3bdf55d228c4a0dcb44","head":{"label":"nguyenvu1892:edit_subject","ref":"edit_subject","sha":"f4800b9701d9a0b4e888e3bdf55d228c4a0dcb44","user":{"login":"nguyenvu1892","id":22019661,"avatar_url":"https://avatars1.githubusercontent.com/u/22019661?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenvu1892","html_url":"https://github.com/nguyenvu1892","followers_url":"https://api.github.com/users/nguyenvu1892/followers","following_url":"https://api.github.com/users/nguyenvu1892/following{/other_user}","gists_url":"https://api.github.com/users/nguyenvu1892/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenvu1892/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenvu1892/subscriptions","organizations_url":"https://api.github.com/users/nguyenvu1892/orgs","repos_url":"https://api.github.com/users/nguyenvu1892/repos","events_url":"https://api.github.com/users/nguyenvu1892/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenvu1892/received_events","type":"User","site_admin":false},"repo":{"id":120607338,"name":"training_management","full_name":"nguyenvu1892/training_management","owner":{"login":"nguyenvu1892","id":22019661,"avatar_url":"https://avatars1.githubusercontent.com/u/22019661?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenvu1892","html_url":"https://github.com/nguyenvu1892","followers_url":"https://api.github.com/users/nguyenvu1892/followers","following_url":"https://api.github.com/users/nguyenvu1892/following{/other_user}","gists_url":"https://api.github.com/users/nguyenvu1892/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenvu1892/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenvu1892/subscriptions","organizations_url":"https://api.github.com/users/nguyenvu1892/orgs","repos_url":"https://api.github.com/users/nguyenvu1892/repos","events_url":"https://api.github.com/users/nguyenvu1892/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenvu1892/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nguyenvu1892/training_management","description":null,"fork":true,"url":"https://api.github.com/repos/nguyenvu1892/training_management","forks_url":"https://api.github.com/repos/nguyenvu1892/training_management/forks","keys_url":"https://api.github.com/repos/nguyenvu1892/training_management/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nguyenvu1892/training_management/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nguyenvu1892/training_management/teams","hooks_url":"https://api.github.com/repos/nguyenvu1892/training_management/hooks","issue_events_url":"https://api.github.com/repos/nguyenvu1892/training_management/issues/events{/number}","events_url":"https://api.github.com/repos/nguyenvu1892/training_management/events","assignees_url":"https://api.github.com/repos/nguyenvu1892/training_management/assignees{/user}","branches_url":"https://api.github.com/repos/nguyenvu1892/training_management/branches{/branch}","tags_url":"https://api.github.com/repos/nguyenvu1892/training_management/tags","blobs_url":"https://api.github.com/repos/nguyenvu1892/training_management/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nguyenvu1892/training_management/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nguyenvu1892/training_management/git/refs{/sha}","trees_url":"https://api.github.com/repos/nguyenvu1892/training_management/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nguyenvu1892/training_management/statuses/{sha}","languages_url":"https://api.github.com/repos/nguyenvu1892/training_management/languages","stargazers_url":"https://api.github.com/repos/nguyenvu1892/training_management/stargazers","contributors_url":"https://api.github.com/repos/nguyenvu1892/training_management/contributors","subscribers_url":"https://api.github.com/repos/nguyenvu1892/training_management/subscribers","subscription_url":"https://api.github.com/repos/nguyenvu1892/training_management/subscription","commits_url":"https://api.github.com/repos/nguyenvu1892/training_management/commits{/sha}","git_commits_url":"https://api.github.com/repos/nguyenvu1892/training_management/git/commits{/sha}","comments_url":"https://api.github.com/repos/nguyenvu1892/training_management/comments{/number}","issue_comment_url":"https://api.github.com/repos/nguyenvu1892/training_management/issues/comments{/number}","contents_url":"https://api.github.com/repos/nguyenvu1892/training_management/contents/{+path}","compare_url":"https://api.github.com/repos/nguyenvu1892/training_management/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nguyenvu1892/training_management/merges","archive_url":"https://api.github.com/repos/nguyenvu1892/training_management/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nguyenvu1892/training_management/downloads","issues_url":"https://api.github.com/repos/nguyenvu1892/training_management/issues{/number}","pulls_url":"https://api.github.com/repos/nguyenvu1892/training_management/pulls{/number}","milestones_url":"https://api.github.com/repos/nguyenvu1892/training_management/milestones{/number}","notifications_url":"https://api.github.com/repos/nguyenvu1892/training_management/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nguyenvu1892/training_management/labels{/name}","releases_url":"https://api.github.com/repos/nguyenvu1892/training_management/releases{/id}","deployments_url":"https://api.github.com/repos/nguyenvu1892/training_management/deployments","created_at":"2018-02-07T11:37:10Z","updated_at":"2018-02-07T11:36:05Z","pushed_at":"2018-03-14T11:46:56Z","git_url":"git://github.com/nguyenvu1892/training_management.git","ssh_url":"git@github.com:nguyenvu1892/training_management.git","clone_url":"https://github.com/nguyenvu1892/training_management.git","svn_url":"https://github.com/nguyenvu1892/training_management","homepage":null,"size":453,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"awesome-academy:develop","ref":"develop","sha":"b82a9e36710d3d1784f010d2716be99ba03cfdc9","user":{"login":"awesome-academy","id":33895223,"avatar_url":"https://avatars0.githubusercontent.com/u/33895223?v=4","gravatar_id":"","url":"https://api.github.com/users/awesome-academy","html_url":"https://github.com/awesome-academy","followers_url":"https://api.github.com/users/awesome-academy/followers","following_url":"https://api.github.com/users/awesome-academy/following{/other_user}","gists_url":"https://api.github.com/users/awesome-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/awesome-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awesome-academy/subscriptions","organizations_url":"https://api.github.com/users/awesome-academy/orgs","repos_url":"https://api.github.com/users/awesome-academy/repos","events_url":"https://api.github.com/users/awesome-academy/events{/privacy}","received_events_url":"https://api.github.com/users/awesome-academy/received_events","type":"Organization","site_admin":false},"repo":{"id":120607242,"name":"training_management","full_name":"awesome-academy/training_management","owner":{"login":"awesome-academy","id":33895223,"avatar_url":"https://avatars0.githubusercontent.com/u/33895223?v=4","gravatar_id":"","url":"https://api.github.com/users/awesome-academy","html_url":"https://github.com/awesome-academy","followers_url":"https://api.github.com/users/awesome-academy/followers","following_url":"https://api.github.com/users/awesome-academy/following{/other_user}","gists_url":"https://api.github.com/users/awesome-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/awesome-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awesome-academy/subscriptions","organizations_url":"https://api.github.com/users/awesome-academy/orgs","repos_url":"https://api.github.com/users/awesome-academy/repos","events_url":"https://api.github.com/users/awesome-academy/events{/privacy}","received_events_url":"https://api.github.com/users/awesome-academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/awesome-academy/training_management","description":null,"fork":false,"url":"https://api.github.com/repos/awesome-academy/training_management","forks_url":"https://api.github.com/repos/awesome-academy/training_management/forks","keys_url":"https://api.github.com/repos/awesome-academy/training_management/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awesome-academy/training_management/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awesome-academy/training_management/teams","hooks_url":"https://api.github.com/repos/awesome-academy/training_management/hooks","issue_events_url":"https://api.github.com/repos/awesome-academy/training_management/issues/events{/number}","events_url":"https://api.github.com/repos/awesome-academy/training_management/events","assignees_url":"https://api.github.com/repos/awesome-academy/training_management/assignees{/user}","branches_url":"https://api.github.com/repos/awesome-academy/training_management/branches{/branch}","tags_url":"https://api.github.com/repos/awesome-academy/training_management/tags","blobs_url":"https://api.github.com/repos/awesome-academy/training_management/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awesome-academy/training_management/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awesome-academy/training_management/git/refs{/sha}","trees_url":"https://api.github.com/repos/awesome-academy/training_management/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awesome-academy/training_management/statuses/{sha}","languages_url":"https://api.github.com/repos/awesome-academy/training_management/languages","stargazers_url":"https://api.github.com/repos/awesome-academy/training_management/stargazers","contributors_url":"https://api.github.com/repos/awesome-academy/training_management/contributors","subscribers_url":"https://api.github.com/repos/awesome-academy/training_management/subscribers","subscription_url":"https://api.github.com/repos/awesome-academy/training_management/subscription","commits_url":"https://api.github.com/repos/awesome-academy/training_management/commits{/sha}","git_commits_url":"https://api.github.com/repos/awesome-academy/training_management/git/commits{/sha}","comments_url":"https://api.github.com/repos/awesome-academy/training_management/comments{/number}","issue_comment_url":"https://api.github.com/repos/awesome-academy/training_management/issues/comments{/number}","contents_url":"https://api.github.com/repos/awesome-academy/training_management/contents/{+path}","compare_url":"https://api.github.com/repos/awesome-academy/training_management/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awesome-academy/training_management/merges","archive_url":"https://api.github.com/repos/awesome-academy/training_management/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awesome-academy/training_management/downloads","issues_url":"https://api.github.com/repos/awesome-academy/training_management/issues{/number}","pulls_url":"https://api.github.com/repos/awesome-academy/training_management/pulls{/number}","milestones_url":"https://api.github.com/repos/awesome-academy/training_management/milestones{/number}","notifications_url":"https://api.github.com/repos/awesome-academy/training_management/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awesome-academy/training_management/labels{/name}","releases_url":"https://api.github.com/repos/awesome-academy/training_management/releases{/id}","deployments_url":"https://api.github.com/repos/awesome-academy/training_management/deployments","created_at":"2018-02-07T11:36:05Z","updated_at":"2018-02-07T11:36:05Z","pushed_at":"2018-03-14T11:46:57Z","git_url":"git://github.com/awesome-academy/training_management.git","ssh_url":"git@github.com:awesome-academy/training_management.git","clone_url":"https://github.com/awesome-academy/training_management.git","svn_url":"https://github.com/awesome-academy/training_management","homepage":null,"size":73,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awesome-academy/training_management/pulls/10"},"html":{"href":"https://github.com/awesome-academy/training_management/pull/10"},"issue":{"href":"https://api.github.com/repos/awesome-academy/training_management/issues/10"},"comments":{"href":"https://api.github.com/repos/awesome-academy/training_management/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/awesome-academy/training_management/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/awesome-academy/training_management/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awesome-academy/training_management/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/awesome-academy/training_management/statuses/f4800b9701d9a0b4e888e3bdf55d228c4a0dcb44"}},"author_association":"NONE"}}
{"actor":{"display_login":"huongnguyenmta"}}