{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/tms_68/pulls/comments/84416304","pull_request_review_id":5196666,"id":84416304,"diff_hunk":"@@ -14,13 +15,21 @@ def index\n   end\n \n   def show\n-    @subjects = @course.subjects\n-    @trainer_in_course = @course.users.page params[:page]\n+    @subjects = @course.subjects.map do |subject|\n+      [subject, UserSubject.find_by_subject(@user_course.user.id, subject.id,\n+        @course.id), CourseSubject.find_by_course_subject(@course.id, subject.id)]\n+    end","path":"app/controllers/user_courses_controller.rb","position":17,"original_position":17,"commit_id":"3fe9bcc7cf943d40bd97ba01fe76b8a023fb6f26","original_commit_id":"3fe9bcc7cf943d40bd97ba01fe76b8a023fb6f26","user":{"login":"nvtanh","id":5591946,"avatar_url":"https://avatars.githubusercontent.com/u/5591946?v=3","gravatar_id":"","url":"https://api.github.com/users/nvtanh","html_url":"https://github.com/nvtanh","followers_url":"https://api.github.com/users/nvtanh/followers","following_url":"https://api.github.com/users/nvtanh/following{/other_user}","gists_url":"https://api.github.com/users/nvtanh/gists{/gist_id}","starred_url":"https://api.github.com/users/nvtanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvtanh/subscriptions","organizations_url":"https://api.github.com/users/nvtanh/orgs","repos_url":"https://api.github.com/users/nvtanh/repos","events_url":"https://api.github.com/users/nvtanh/events{/privacy}","received_events_url":"https://api.github.com/users/nvtanh/received_events","type":"User","site_admin":false},"body":"cái này có thể viết bằng câu query sql dc ko ? ","created_at":"2016-10-21T04:05:18Z","updated_at":"2016-10-21T04:05:18Z","html_url":"https://github.com/framgia/tms_68/pull/13#discussion_r84416304","pull_request_url":"https://api.github.com/repos/framgia/tms_68/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_68/pulls/comments/84416304"},"html":{"href":"https://github.com/framgia/tms_68/pull/13#discussion_r84416304"},"pull_request":{"href":"https://api.github.com/repos/framgia/tms_68/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/tms_68/pulls/13","id":90215324,"html_url":"https://github.com/framgia/tms_68/pull/13","diff_url":"https://github.com/framgia/tms_68/pull/13.diff","patch_url":"https://github.com/framgia/tms_68/pull/13.patch","issue_url":"https://api.github.com/repos/framgia/tms_68/issues/13","number":13,"state":"open","locked":false,"title":"detail subject","user":{"login":"Huyliver6793","id":18795322,"avatar_url":"https://avatars.githubusercontent.com/u/18795322?v=3","gravatar_id":"","url":"https://api.github.com/users/Huyliver6793","html_url":"https://github.com/Huyliver6793","followers_url":"https://api.github.com/users/Huyliver6793/followers","following_url":"https://api.github.com/users/Huyliver6793/following{/other_user}","gists_url":"https://api.github.com/users/Huyliver6793/gists{/gist_id}","starred_url":"https://api.github.com/users/Huyliver6793/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Huyliver6793/subscriptions","organizations_url":"https://api.github.com/users/Huyliver6793/orgs","repos_url":"https://api.github.com/users/Huyliver6793/repos","events_url":"https://api.github.com/users/Huyliver6793/events{/privacy}","received_events_url":"https://api.github.com/users/Huyliver6793/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-20T14:45:43Z","updated_at":"2016-10-21T04:09:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0ccb44aa1b558df5023cc38da46e51fa3bca520","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/tms_68/pulls/13/commits","review_comments_url":"https://api.github.com/repos/framgia/tms_68/pulls/13/comments","review_comment_url":"https://api.github.com/repos/framgia/tms_68/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/tms_68/issues/13/comments","statuses_url":"https://api.github.com/repos/framgia/tms_68/statuses/3fe9bcc7cf943d40bd97ba01fe76b8a023fb6f26","head":{"label":"Huyliver6793:usersubject","ref":"usersubject","sha":"3fe9bcc7cf943d40bd97ba01fe76b8a023fb6f26","user":{"login":"Huyliver6793","id":18795322,"avatar_url":"https://avatars.githubusercontent.com/u/18795322?v=3","gravatar_id":"","url":"https://api.github.com/users/Huyliver6793","html_url":"https://github.com/Huyliver6793","followers_url":"https://api.github.com/users/Huyliver6793/followers","following_url":"https://api.github.com/users/Huyliver6793/following{/other_user}","gists_url":"https://api.github.com/users/Huyliver6793/gists{/gist_id}","starred_url":"https://api.github.com/users/Huyliver6793/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Huyliver6793/subscriptions","organizations_url":"https://api.github.com/users/Huyliver6793/orgs","repos_url":"https://api.github.com/users/Huyliver6793/repos","events_url":"https://api.github.com/users/Huyliver6793/events{/privacy}","received_events_url":"https://api.github.com/users/Huyliver6793/received_events","type":"User","site_admin":false},"repo":{"id":71091533,"name":"tms_68","full_name":"Huyliver6793/tms_68","owner":{"login":"Huyliver6793","id":18795322,"avatar_url":"https://avatars.githubusercontent.com/u/18795322?v=3","gravatar_id":"","url":"https://api.github.com/users/Huyliver6793","html_url":"https://github.com/Huyliver6793","followers_url":"https://api.github.com/users/Huyliver6793/followers","following_url":"https://api.github.com/users/Huyliver6793/following{/other_user}","gists_url":"https://api.github.com/users/Huyliver6793/gists{/gist_id}","starred_url":"https://api.github.com/users/Huyliver6793/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Huyliver6793/subscriptions","organizations_url":"https://api.github.com/users/Huyliver6793/orgs","repos_url":"https://api.github.com/users/Huyliver6793/repos","events_url":"https://api.github.com/users/Huyliver6793/events{/privacy}","received_events_url":"https://api.github.com/users/Huyliver6793/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Huyliver6793/tms_68","description":"Training Project for Framgia Edu DN","fork":true,"url":"https://api.github.com/repos/Huyliver6793/tms_68","forks_url":"https://api.github.com/repos/Huyliver6793/tms_68/forks","keys_url":"https://api.github.com/repos/Huyliver6793/tms_68/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Huyliver6793/tms_68/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Huyliver6793/tms_68/teams","hooks_url":"https://api.github.com/repos/Huyliver6793/tms_68/hooks","issue_events_url":"https://api.github.com/repos/Huyliver6793/tms_68/issues/events{/number}","events_url":"https://api.github.com/repos/Huyliver6793/tms_68/events","assignees_url":"https://api.github.com/repos/Huyliver6793/tms_68/assignees{/user}","branches_url":"https://api.github.com/repos/Huyliver6793/tms_68/branches{/branch}","tags_url":"https://api.github.com/repos/Huyliver6793/tms_68/tags","blobs_url":"https://api.github.com/repos/Huyliver6793/tms_68/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Huyliver6793/tms_68/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Huyliver6793/tms_68/git/refs{/sha}","trees_url":"https://api.github.com/repos/Huyliver6793/tms_68/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Huyliver6793/tms_68/statuses/{sha}","languages_url":"https://api.github.com/repos/Huyliver6793/tms_68/languages","stargazers_url":"https://api.github.com/repos/Huyliver6793/tms_68/stargazers","contributors_url":"https://api.github.com/repos/Huyliver6793/tms_68/contributors","subscribers_url":"https://api.github.com/repos/Huyliver6793/tms_68/subscribers","subscription_url":"https://api.github.com/repos/Huyliver6793/tms_68/subscription","commits_url":"https://api.github.com/repos/Huyliver6793/tms_68/commits{/sha}","git_commits_url":"https://api.github.com/repos/Huyliver6793/tms_68/git/commits{/sha}","comments_url":"https://api.github.com/repos/Huyliver6793/tms_68/comments{/number}","issue_comment_url":"https://api.github.com/repos/Huyliver6793/tms_68/issues/comments{/number}","contents_url":"https://api.github.com/repos/Huyliver6793/tms_68/contents/{+path}","compare_url":"https://api.github.com/repos/Huyliver6793/tms_68/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Huyliver6793/tms_68/merges","archive_url":"https://api.github.com/repos/Huyliver6793/tms_68/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Huyliver6793/tms_68/downloads","issues_url":"https://api.github.com/repos/Huyliver6793/tms_68/issues{/number}","pulls_url":"https://api.github.com/repos/Huyliver6793/tms_68/pulls{/number}","milestones_url":"https://api.github.com/repos/Huyliver6793/tms_68/milestones{/number}","notifications_url":"https://api.github.com/repos/Huyliver6793/tms_68/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Huyliver6793/tms_68/labels{/name}","releases_url":"https://api.github.com/repos/Huyliver6793/tms_68/releases{/id}","deployments_url":"https://api.github.com/repos/Huyliver6793/tms_68/deployments","created_at":"2016-10-17T02:07:37Z","updated_at":"2016-10-14T01:58:34Z","pushed_at":"2016-10-20T16:50:20Z","git_url":"git://github.com/Huyliver6793/tms_68.git","ssh_url":"git@github.com:Huyliver6793/tms_68.git","clone_url":"https://github.com/Huyliver6793/tms_68.git","svn_url":"https://github.com/Huyliver6793/tms_68","homepage":null,"size":1154,"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":"2d1095430916e84e612347e77aaf613150412e2d","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":70864604,"name":"tms_68","full_name":"framgia/tms_68","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_68","description":"Training Project for Framgia Edu DN","fork":false,"url":"https://api.github.com/repos/framgia/tms_68","forks_url":"https://api.github.com/repos/framgia/tms_68/forks","keys_url":"https://api.github.com/repos/framgia/tms_68/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/tms_68/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/tms_68/teams","hooks_url":"https://api.github.com/repos/framgia/tms_68/hooks","issue_events_url":"https://api.github.com/repos/framgia/tms_68/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/tms_68/events","assignees_url":"https://api.github.com/repos/framgia/tms_68/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/tms_68/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/tms_68/tags","blobs_url":"https://api.github.com/repos/framgia/tms_68/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/tms_68/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/tms_68/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/tms_68/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/tms_68/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/tms_68/languages","stargazers_url":"https://api.github.com/repos/framgia/tms_68/stargazers","contributors_url":"https://api.github.com/repos/framgia/tms_68/contributors","subscribers_url":"https://api.github.com/repos/framgia/tms_68/subscribers","subscription_url":"https://api.github.com/repos/framgia/tms_68/subscription","commits_url":"https://api.github.com/repos/framgia/tms_68/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/tms_68/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/tms_68/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/tms_68/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/tms_68/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/tms_68/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/tms_68/merges","archive_url":"https://api.github.com/repos/framgia/tms_68/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/tms_68/downloads","issues_url":"https://api.github.com/repos/framgia/tms_68/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/tms_68/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/tms_68/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/tms_68/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/tms_68/labels{/name}","releases_url":"https://api.github.com/repos/framgia/tms_68/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/tms_68/deployments","created_at":"2016-10-14T01:58:34Z","updated_at":"2016-10-14T01:58:34Z","pushed_at":"2016-10-21T03:42:36Z","git_url":"git://github.com/framgia/tms_68.git","ssh_url":"git@github.com:framgia/tms_68.git","clone_url":"https://github.com/framgia/tms_68.git","svn_url":"https://github.com/framgia/tms_68","homepage":null,"size":1195,"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":3,"forks":3,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_68/pulls/13"},"html":{"href":"https://github.com/framgia/tms_68/pull/13"},"issue":{"href":"https://api.github.com/repos/framgia/tms_68/issues/13"},"comments":{"href":"https://api.github.com/repos/framgia/tms_68/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/tms_68/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/tms_68/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/tms_68/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/tms_68/statuses/3fe9bcc7cf943d40bd97ba01fe76b8a023fb6f26"}}}}
{"actor":{"display_login":"nvtanh"}}