{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/tms_45/pulls/comments/50070118","id":50070118,"diff_hunk":"@@ -0,0 +1,34 @@\n+class Admin::CoursesController < Admin::AdminController\n+  before_action :load_course, only: [:show]\n+\n+  def new\n+    @course = Course.new\n+    @course.build_subject_courses\n+  end\n+\n+  def create\n+    @course = Course.new course_params\n+    if @course.save\n+      flash[:notice] = t \"admin.flash.create_course\"\n+      redirect_to admin_course_path @course\n+    else\n+      @course.build_subject_courses\n+      render :new\n+    end\n+  end\n+\n+  def show\n+  end\n+\n+  private\n+  def course_params\n+    params.require(:course).permit :name, :description, :status, :start_date,\n+      :end_date, subject_courses_attributes: [:id, :subject_id, :course_id],\n+      subjects_attributes: [:id, :name, :description,\n+        tasks_attributes: [:id, :name]]","path":"app/controllers/admin/courses_controller.rb","position":28,"original_position":28,"commit_id":"c862834b0397b687306ec7d32de15deae839e33a","original_commit_id":"c862834b0397b687306ec7d32de15deae839e33a","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":"ident, k cần lùi vào","created_at":"2016-01-19T03:46:13Z","updated_at":"2016-01-19T03:46:13Z","html_url":"https://github.com/framgia/tms_45/pull/21#discussion_r50070118","pull_request_url":"https://api.github.com/repos/framgia/tms_45/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_45/pulls/comments/50070118"},"html":{"href":"https://github.com/framgia/tms_45/pull/21#discussion_r50070118"},"pull_request":{"href":"https://api.github.com/repos/framgia/tms_45/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/tms_45/pulls/21","id":56316828,"html_url":"https://github.com/framgia/tms_45/pull/21","diff_url":"https://github.com/framgia/tms_45/pull/21.diff","patch_url":"https://github.com/framgia/tms_45/pull/21.patch","issue_url":"https://api.github.com/repos/framgia/tms_45/issues/21","number":21,"state":"open","locked":false,"title":"Add new course","user":{"login":"NeverSmileK57CLC","id":10071629,"avatar_url":"https://avatars.githubusercontent.com/u/10071629?v=3","gravatar_id":"","url":"https://api.github.com/users/NeverSmileK57CLC","html_url":"https://github.com/NeverSmileK57CLC","followers_url":"https://api.github.com/users/NeverSmileK57CLC/followers","following_url":"https://api.github.com/users/NeverSmileK57CLC/following{/other_user}","gists_url":"https://api.github.com/users/NeverSmileK57CLC/gists{/gist_id}","starred_url":"https://api.github.com/users/NeverSmileK57CLC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeverSmileK57CLC/subscriptions","organizations_url":"https://api.github.com/users/NeverSmileK57CLC/orgs","repos_url":"https://api.github.com/users/NeverSmileK57CLC/repos","events_url":"https://api.github.com/users/NeverSmileK57CLC/events{/privacy}","received_events_url":"https://api.github.com/users/NeverSmileK57CLC/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-18T09:13:33Z","updated_at":"2016-01-19T03:46:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c7b03087137a7d1720a68d158d5cd0adecfaba9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/tms_45/pulls/21/commits","review_comments_url":"https://api.github.com/repos/framgia/tms_45/pulls/21/comments","review_comment_url":"https://api.github.com/repos/framgia/tms_45/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/tms_45/issues/21/comments","statuses_url":"https://api.github.com/repos/framgia/tms_45/statuses/c862834b0397b687306ec7d32de15deae839e33a","head":{"label":"NeverSmileK57CLC:task/51140","ref":"task/51140","sha":"c862834b0397b687306ec7d32de15deae839e33a","user":{"login":"NeverSmileK57CLC","id":10071629,"avatar_url":"https://avatars.githubusercontent.com/u/10071629?v=3","gravatar_id":"","url":"https://api.github.com/users/NeverSmileK57CLC","html_url":"https://github.com/NeverSmileK57CLC","followers_url":"https://api.github.com/users/NeverSmileK57CLC/followers","following_url":"https://api.github.com/users/NeverSmileK57CLC/following{/other_user}","gists_url":"https://api.github.com/users/NeverSmileK57CLC/gists{/gist_id}","starred_url":"https://api.github.com/users/NeverSmileK57CLC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeverSmileK57CLC/subscriptions","organizations_url":"https://api.github.com/users/NeverSmileK57CLC/orgs","repos_url":"https://api.github.com/users/NeverSmileK57CLC/repos","events_url":"https://api.github.com/users/NeverSmileK57CLC/events{/privacy}","received_events_url":"https://api.github.com/users/NeverSmileK57CLC/received_events","type":"User","site_admin":false},"repo":{"id":49485154,"name":"tms_45","full_name":"NeverSmileK57CLC/tms_45","owner":{"login":"NeverSmileK57CLC","id":10071629,"avatar_url":"https://avatars.githubusercontent.com/u/10071629?v=3","gravatar_id":"","url":"https://api.github.com/users/NeverSmileK57CLC","html_url":"https://github.com/NeverSmileK57CLC","followers_url":"https://api.github.com/users/NeverSmileK57CLC/followers","following_url":"https://api.github.com/users/NeverSmileK57CLC/following{/other_user}","gists_url":"https://api.github.com/users/NeverSmileK57CLC/gists{/gist_id}","starred_url":"https://api.github.com/users/NeverSmileK57CLC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeverSmileK57CLC/subscriptions","organizations_url":"https://api.github.com/users/NeverSmileK57CLC/orgs","repos_url":"https://api.github.com/users/NeverSmileK57CLC/repos","events_url":"https://api.github.com/users/NeverSmileK57CLC/events{/privacy}","received_events_url":"https://api.github.com/users/NeverSmileK57CLC/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NeverSmileK57CLC/tms_45","description":"Framgia Training Management System (training)","fork":true,"url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45","forks_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/forks","keys_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/teams","hooks_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/hooks","issue_events_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/issues/events{/number}","events_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/events","assignees_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/assignees{/user}","branches_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/branches{/branch}","tags_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/tags","blobs_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/git/refs{/sha}","trees_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/statuses/{sha}","languages_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/languages","stargazers_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/stargazers","contributors_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/contributors","subscribers_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/subscribers","subscription_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/subscription","commits_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/commits{/sha}","git_commits_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/git/commits{/sha}","comments_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/comments{/number}","issue_comment_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/issues/comments{/number}","contents_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/contents/{+path}","compare_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/merges","archive_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/downloads","issues_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/issues{/number}","pulls_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/pulls{/number}","milestones_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/milestones{/number}","notifications_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/labels{/name}","releases_url":"https://api.github.com/repos/NeverSmileK57CLC/tms_45/releases{/id}","created_at":"2016-01-12T08:12:19Z","updated_at":"2016-01-12T02:21:47Z","pushed_at":"2016-01-19T03:37:05Z","git_url":"git://github.com/NeverSmileK57CLC/tms_45.git","ssh_url":"git@github.com:NeverSmileK57CLC/tms_45.git","clone_url":"https://github.com/NeverSmileK57CLC/tms_45.git","svn_url":"https://github.com/NeverSmileK57CLC/tms_45","homepage":null,"size":56,"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":"7f5e5ab3d7031d2b03309ae6f46dc2183a0a27f9","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":49468864,"name":"tms_45","full_name":"framgia/tms_45","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/tms_45","description":"Framgia Training Management System (training)","fork":false,"url":"https://api.github.com/repos/framgia/tms_45","forks_url":"https://api.github.com/repos/framgia/tms_45/forks","keys_url":"https://api.github.com/repos/framgia/tms_45/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/tms_45/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/tms_45/teams","hooks_url":"https://api.github.com/repos/framgia/tms_45/hooks","issue_events_url":"https://api.github.com/repos/framgia/tms_45/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/tms_45/events","assignees_url":"https://api.github.com/repos/framgia/tms_45/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/tms_45/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/tms_45/tags","blobs_url":"https://api.github.com/repos/framgia/tms_45/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/tms_45/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/tms_45/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/tms_45/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/tms_45/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/tms_45/languages","stargazers_url":"https://api.github.com/repos/framgia/tms_45/stargazers","contributors_url":"https://api.github.com/repos/framgia/tms_45/contributors","subscribers_url":"https://api.github.com/repos/framgia/tms_45/subscribers","subscription_url":"https://api.github.com/repos/framgia/tms_45/subscription","commits_url":"https://api.github.com/repos/framgia/tms_45/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/tms_45/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/tms_45/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/tms_45/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/tms_45/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/tms_45/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/tms_45/merges","archive_url":"https://api.github.com/repos/framgia/tms_45/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/tms_45/downloads","issues_url":"https://api.github.com/repos/framgia/tms_45/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/tms_45/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/tms_45/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/tms_45/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/tms_45/labels{/name}","releases_url":"https://api.github.com/repos/framgia/tms_45/releases{/id}","created_at":"2016-01-12T02:21:47Z","updated_at":"2016-01-12T02:21:47Z","pushed_at":"2016-01-19T03:37:06Z","git_url":"git://github.com/framgia/tms_45.git","ssh_url":"git@github.com:framgia/tms_45.git","clone_url":"https://github.com/framgia/tms_45.git","svn_url":"https://github.com/framgia/tms_45","homepage":null,"size":68,"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":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_45/pulls/21"},"html":{"href":"https://github.com/framgia/tms_45/pull/21"},"issue":{"href":"https://api.github.com/repos/framgia/tms_45/issues/21"},"comments":{"href":"https://api.github.com/repos/framgia/tms_45/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/tms_45/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/tms_45/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/tms_45/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/tms_45/statuses/c862834b0397b687306ec7d32de15deae839e33a"}}}}