{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/tms_41/pulls/comments/47209324","id":47209324,"diff_hunk":"@@ -0,0 +1,28 @@\n+class Supervisor::CoursesController < ApplicationController\n+\n+  def index\n+  end\n+\n+  def new\n+    @course = Course.new\n+    @subjects = Subject.all\n+  end\n+\n+  def create\n+    @course = Course.new\n+    @course.attributes = {'subject_ids' => []}.merge(course_params || {})","path":"app/controllers/supervisor/courses_controller.rb","position":13,"original_position":13,"commit_id":"20d70b8d124236b2978bf3eb3da5e9cd49bc40bb","original_commit_id":"20d70b8d124236b2978bf3eb3da5e9cd49bc40bb","user":{"login":"noor-framgia","id":14325963,"avatar_url":"https://avatars.githubusercontent.com/u/14325963?v=3","gravatar_id":"","url":"https://api.github.com/users/noor-framgia","html_url":"https://github.com/noor-framgia","followers_url":"https://api.github.com/users/noor-framgia/followers","following_url":"https://api.github.com/users/noor-framgia/following{/other_user}","gists_url":"https://api.github.com/users/noor-framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/noor-framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noor-framgia/subscriptions","organizations_url":"https://api.github.com/users/noor-framgia/orgs","repos_url":"https://api.github.com/users/noor-framgia/repos","events_url":"https://api.github.com/users/noor-framgia/events{/privacy}","received_events_url":"https://api.github.com/users/noor-framgia/received_events","type":"User","site_admin":false},"body":"Sir, we think, in case, no subject is checked then in it necessary to include subject_ids with empty array. So we created an empty @course and then set its attributes.","created_at":"2015-12-10T10:21:20Z","updated_at":"2015-12-10T10:21:20Z","html_url":"https://github.com/framgia/tms_41/pull/14#discussion_r47209324","pull_request_url":"https://api.github.com/repos/framgia/tms_41/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_41/pulls/comments/47209324"},"html":{"href":"https://github.com/framgia/tms_41/pull/14#discussion_r47209324"},"pull_request":{"href":"https://api.github.com/repos/framgia/tms_41/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/tms_41/pulls/14","id":53092415,"html_url":"https://github.com/framgia/tms_41/pull/14","diff_url":"https://github.com/framgia/tms_41/pull/14.diff","patch_url":"https://github.com/framgia/tms_41/pull/14.patch","issue_url":"https://api.github.com/repos/framgia/tms_41/issues/14","number":14,"state":"open","locked":false,"title":"47152_course_create","user":{"login":"noor-framgia","id":14325963,"avatar_url":"https://avatars.githubusercontent.com/u/14325963?v=3","gravatar_id":"","url":"https://api.github.com/users/noor-framgia","html_url":"https://github.com/noor-framgia","followers_url":"https://api.github.com/users/noor-framgia/followers","following_url":"https://api.github.com/users/noor-framgia/following{/other_user}","gists_url":"https://api.github.com/users/noor-framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/noor-framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noor-framgia/subscriptions","organizations_url":"https://api.github.com/users/noor-framgia/orgs","repos_url":"https://api.github.com/users/noor-framgia/repos","events_url":"https://api.github.com/users/noor-framgia/events{/privacy}","received_events_url":"https://api.github.com/users/noor-framgia/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-09T09:06:08Z","updated_at":"2015-12-10T10:21:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d55e576b697df4def8646b548e56631a19335c7b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/tms_41/pulls/14/commits","review_comments_url":"https://api.github.com/repos/framgia/tms_41/pulls/14/comments","review_comment_url":"https://api.github.com/repos/framgia/tms_41/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/tms_41/issues/14/comments","statuses_url":"https://api.github.com/repos/framgia/tms_41/statuses/20d70b8d124236b2978bf3eb3da5e9cd49bc40bb","head":{"label":"noor-framgia:47152_create_course","ref":"47152_create_course","sha":"20d70b8d124236b2978bf3eb3da5e9cd49bc40bb","user":{"login":"noor-framgia","id":14325963,"avatar_url":"https://avatars.githubusercontent.com/u/14325963?v=3","gravatar_id":"","url":"https://api.github.com/users/noor-framgia","html_url":"https://github.com/noor-framgia","followers_url":"https://api.github.com/users/noor-framgia/followers","following_url":"https://api.github.com/users/noor-framgia/following{/other_user}","gists_url":"https://api.github.com/users/noor-framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/noor-framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noor-framgia/subscriptions","organizations_url":"https://api.github.com/users/noor-framgia/orgs","repos_url":"https://api.github.com/users/noor-framgia/repos","events_url":"https://api.github.com/users/noor-framgia/events{/privacy}","received_events_url":"https://api.github.com/users/noor-framgia/received_events","type":"User","site_admin":false},"repo":{"id":47108533,"name":"tms_41","full_name":"noor-framgia/tms_41","owner":{"login":"noor-framgia","id":14325963,"avatar_url":"https://avatars.githubusercontent.com/u/14325963?v=3","gravatar_id":"","url":"https://api.github.com/users/noor-framgia","html_url":"https://github.com/noor-framgia","followers_url":"https://api.github.com/users/noor-framgia/followers","following_url":"https://api.github.com/users/noor-framgia/following{/other_user}","gists_url":"https://api.github.com/users/noor-framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/noor-framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noor-framgia/subscriptions","organizations_url":"https://api.github.com/users/noor-framgia/orgs","repos_url":"https://api.github.com/users/noor-framgia/repos","events_url":"https://api.github.com/users/noor-framgia/events{/privacy}","received_events_url":"https://api.github.com/users/noor-framgia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noor-framgia/tms_41","description":"Framgia Training Management System (training)","fork":true,"url":"https://api.github.com/repos/noor-framgia/tms_41","forks_url":"https://api.github.com/repos/noor-framgia/tms_41/forks","keys_url":"https://api.github.com/repos/noor-framgia/tms_41/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noor-framgia/tms_41/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noor-framgia/tms_41/teams","hooks_url":"https://api.github.com/repos/noor-framgia/tms_41/hooks","issue_events_url":"https://api.github.com/repos/noor-framgia/tms_41/issues/events{/number}","events_url":"https://api.github.com/repos/noor-framgia/tms_41/events","assignees_url":"https://api.github.com/repos/noor-framgia/tms_41/assignees{/user}","branches_url":"https://api.github.com/repos/noor-framgia/tms_41/branches{/branch}","tags_url":"https://api.github.com/repos/noor-framgia/tms_41/tags","blobs_url":"https://api.github.com/repos/noor-framgia/tms_41/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noor-framgia/tms_41/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noor-framgia/tms_41/git/refs{/sha}","trees_url":"https://api.github.com/repos/noor-framgia/tms_41/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noor-framgia/tms_41/statuses/{sha}","languages_url":"https://api.github.com/repos/noor-framgia/tms_41/languages","stargazers_url":"https://api.github.com/repos/noor-framgia/tms_41/stargazers","contributors_url":"https://api.github.com/repos/noor-framgia/tms_41/contributors","subscribers_url":"https://api.github.com/repos/noor-framgia/tms_41/subscribers","subscription_url":"https://api.github.com/repos/noor-framgia/tms_41/subscription","commits_url":"https://api.github.com/repos/noor-framgia/tms_41/commits{/sha}","git_commits_url":"https://api.github.com/repos/noor-framgia/tms_41/git/commits{/sha}","comments_url":"https://api.github.com/repos/noor-framgia/tms_41/comments{/number}","issue_comment_url":"https://api.github.com/repos/noor-framgia/tms_41/issues/comments{/number}","contents_url":"https://api.github.com/repos/noor-framgia/tms_41/contents/{+path}","compare_url":"https://api.github.com/repos/noor-framgia/tms_41/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noor-framgia/tms_41/merges","archive_url":"https://api.github.com/repos/noor-framgia/tms_41/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noor-framgia/tms_41/downloads","issues_url":"https://api.github.com/repos/noor-framgia/tms_41/issues{/number}","pulls_url":"https://api.github.com/repos/noor-framgia/tms_41/pulls{/number}","milestones_url":"https://api.github.com/repos/noor-framgia/tms_41/milestones{/number}","notifications_url":"https://api.github.com/repos/noor-framgia/tms_41/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noor-framgia/tms_41/labels{/name}","releases_url":"https://api.github.com/repos/noor-framgia/tms_41/releases{/id}","created_at":"2015-11-30T09:32:30Z","updated_at":"2015-11-27T07:05:19Z","pushed_at":"2015-12-10T10:10:46Z","git_url":"git://github.com/noor-framgia/tms_41.git","ssh_url":"git@github.com:noor-framgia/tms_41.git","clone_url":"https://github.com/noor-framgia/tms_41.git","svn_url":"https://github.com/noor-framgia/tms_41","homepage":null,"size":2980,"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":"388eb73ca166d59e89c787851176c4dd2f4df49b","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":46964954,"name":"tms_41","full_name":"framgia/tms_41","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_41","description":"Framgia Training Management System (training)","fork":false,"url":"https://api.github.com/repos/framgia/tms_41","forks_url":"https://api.github.com/repos/framgia/tms_41/forks","keys_url":"https://api.github.com/repos/framgia/tms_41/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/tms_41/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/tms_41/teams","hooks_url":"https://api.github.com/repos/framgia/tms_41/hooks","issue_events_url":"https://api.github.com/repos/framgia/tms_41/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/tms_41/events","assignees_url":"https://api.github.com/repos/framgia/tms_41/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/tms_41/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/tms_41/tags","blobs_url":"https://api.github.com/repos/framgia/tms_41/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/tms_41/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/tms_41/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/tms_41/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/tms_41/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/tms_41/languages","stargazers_url":"https://api.github.com/repos/framgia/tms_41/stargazers","contributors_url":"https://api.github.com/repos/framgia/tms_41/contributors","subscribers_url":"https://api.github.com/repos/framgia/tms_41/subscribers","subscription_url":"https://api.github.com/repos/framgia/tms_41/subscription","commits_url":"https://api.github.com/repos/framgia/tms_41/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/tms_41/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/tms_41/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/tms_41/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/tms_41/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/tms_41/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/tms_41/merges","archive_url":"https://api.github.com/repos/framgia/tms_41/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/tms_41/downloads","issues_url":"https://api.github.com/repos/framgia/tms_41/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/tms_41/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/tms_41/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/tms_41/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/tms_41/labels{/name}","releases_url":"https://api.github.com/repos/framgia/tms_41/releases{/id}","created_at":"2015-11-27T07:05:19Z","updated_at":"2015-11-27T07:05:19Z","pushed_at":"2015-12-10T10:10:46Z","git_url":"git://github.com/framgia/tms_41.git","ssh_url":"git@github.com:framgia/tms_41.git","clone_url":"https://github.com/framgia/tms_41.git","svn_url":"https://github.com/framgia/tms_41","homepage":null,"size":2992,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_41/pulls/14"},"html":{"href":"https://github.com/framgia/tms_41/pull/14"},"issue":{"href":"https://api.github.com/repos/framgia/tms_41/issues/14"},"comments":{"href":"https://api.github.com/repos/framgia/tms_41/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/tms_41/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/tms_41/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/tms_41/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/tms_41/statuses/20d70b8d124236b2978bf3eb3da5e9cd49bc40bb"}}}}