{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/ftms/pulls/comments/39603661","id":39603661,"diff_hunk":"@@ -0,0 +1,30 @@\n+module Supervisor::SubjectsHelper\n+  def link_to_remove_fields name, f\n+    f.hidden_field(:_destroy) + link_to_function(name, \"remove_fields(this)\")\n+  end\n+\n+  def link_to_add_fields name, f, association\n+    new_object = f.object.class.reflect_on_association(association).klass.new\n+    fields = f.fields_for(association, new_object, child_index: \"new_#{association}\") do |builder|\n+      render(association.to_s.singularize + \"_fields\", f: builder)\n+    end\n+    link_to_function name, \"add_fields(this, \\\"#{association}\\\", \\\"#{escape_javascript(fields)}\\\")\"\n+  end\n+\n+  def link_to_function name, function, html_options = {}\n+    message = t \"message-link-to-function\"\n+    ActiveSupport::Deprecation.warn message","path":"app/helpers/supervisor/subjects_helper.rb","position":16,"original_position":16,"commit_id":"11b8d58ef1fcfba716aea3836dee280c854f6526","original_commit_id":"11b8d58ef1fcfba716aea3836dee280c854f6526","user":{"login":"dieunb","id":2122175,"avatar_url":"https://avatars.githubusercontent.com/u/2122175?v=3","gravatar_id":"","url":"https://api.github.com/users/dieunb","html_url":"https://github.com/dieunb","followers_url":"https://api.github.com/users/dieunb/followers","following_url":"https://api.github.com/users/dieunb/following{/other_user}","gists_url":"https://api.github.com/users/dieunb/gists{/gist_id}","starred_url":"https://api.github.com/users/dieunb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dieunb/subscriptions","organizations_url":"https://api.github.com/users/dieunb/orgs","repos_url":"https://api.github.com/users/dieunb/repos","events_url":"https://api.github.com/users/dieunb/events{/privacy}","received_events_url":"https://api.github.com/users/dieunb/received_events","type":"User","site_admin":false},"body":"Cái này để làm gì hả em?","created_at":"2015-09-16T08:16:09Z","updated_at":"2015-09-16T08:16:09Z","html_url":"https://github.com/framgia/ftms/pull/5#discussion_r39603661","pull_request_url":"https://api.github.com/repos/framgia/ftms/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/framgia/ftms/pulls/comments/39603661"},"html":{"href":"https://github.com/framgia/ftms/pull/5#discussion_r39603661"},"pull_request":{"href":"https://api.github.com/repos/framgia/ftms/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/ftms/pulls/5","id":45024714,"html_url":"https://github.com/framgia/ftms/pull/5","diff_url":"https://github.com/framgia/ftms/pull/5.diff","patch_url":"https://github.com/framgia/ftms/pull/5.patch","issue_url":"https://api.github.com/repos/framgia/ftms/issues/5","number":5,"state":"open","locked":false,"title":"39066 Supervisor can create subject-task","user":{"login":"lannp","id":12792459,"avatar_url":"https://avatars.githubusercontent.com/u/12792459?v=3","gravatar_id":"","url":"https://api.github.com/users/lannp","html_url":"https://github.com/lannp","followers_url":"https://api.github.com/users/lannp/followers","following_url":"https://api.github.com/users/lannp/following{/other_user}","gists_url":"https://api.github.com/users/lannp/gists{/gist_id}","starred_url":"https://api.github.com/users/lannp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lannp/subscriptions","organizations_url":"https://api.github.com/users/lannp/orgs","repos_url":"https://api.github.com/users/lannp/repos","events_url":"https://api.github.com/users/lannp/events{/privacy}","received_events_url":"https://api.github.com/users/lannp/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-15T09:06:49Z","updated_at":"2015-09-16T08:16:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a346ee7b1fcf37aec115a7adfbb1ae6c067bb77","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/ftms/pulls/5/commits","review_comments_url":"https://api.github.com/repos/framgia/ftms/pulls/5/comments","review_comment_url":"https://api.github.com/repos/framgia/ftms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/ftms/issues/5/comments","statuses_url":"https://api.github.com/repos/framgia/ftms/statuses/11b8d58ef1fcfba716aea3836dee280c854f6526","head":{"label":"lannp:39066-Supervisor-can-create-subject-task","ref":"39066-Supervisor-can-create-subject-task","sha":"11b8d58ef1fcfba716aea3836dee280c854f6526","user":{"login":"lannp","id":12792459,"avatar_url":"https://avatars.githubusercontent.com/u/12792459?v=3","gravatar_id":"","url":"https://api.github.com/users/lannp","html_url":"https://github.com/lannp","followers_url":"https://api.github.com/users/lannp/followers","following_url":"https://api.github.com/users/lannp/following{/other_user}","gists_url":"https://api.github.com/users/lannp/gists{/gist_id}","starred_url":"https://api.github.com/users/lannp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lannp/subscriptions","organizations_url":"https://api.github.com/users/lannp/orgs","repos_url":"https://api.github.com/users/lannp/repos","events_url":"https://api.github.com/users/lannp/events{/privacy}","received_events_url":"https://api.github.com/users/lannp/received_events","type":"User","site_admin":false},"repo":{"id":42429938,"name":"ftms","full_name":"lannp/ftms","owner":{"login":"lannp","id":12792459,"avatar_url":"https://avatars.githubusercontent.com/u/12792459?v=3","gravatar_id":"","url":"https://api.github.com/users/lannp","html_url":"https://github.com/lannp","followers_url":"https://api.github.com/users/lannp/followers","following_url":"https://api.github.com/users/lannp/following{/other_user}","gists_url":"https://api.github.com/users/lannp/gists{/gist_id}","starred_url":"https://api.github.com/users/lannp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lannp/subscriptions","organizations_url":"https://api.github.com/users/lannp/orgs","repos_url":"https://api.github.com/users/lannp/repos","events_url":"https://api.github.com/users/lannp/events{/privacy}","received_events_url":"https://api.github.com/users/lannp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lannp/ftms","description":"Framgia Training Management System","fork":true,"url":"https://api.github.com/repos/lannp/ftms","forks_url":"https://api.github.com/repos/lannp/ftms/forks","keys_url":"https://api.github.com/repos/lannp/ftms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lannp/ftms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lannp/ftms/teams","hooks_url":"https://api.github.com/repos/lannp/ftms/hooks","issue_events_url":"https://api.github.com/repos/lannp/ftms/issues/events{/number}","events_url":"https://api.github.com/repos/lannp/ftms/events","assignees_url":"https://api.github.com/repos/lannp/ftms/assignees{/user}","branches_url":"https://api.github.com/repos/lannp/ftms/branches{/branch}","tags_url":"https://api.github.com/repos/lannp/ftms/tags","blobs_url":"https://api.github.com/repos/lannp/ftms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lannp/ftms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lannp/ftms/git/refs{/sha}","trees_url":"https://api.github.com/repos/lannp/ftms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lannp/ftms/statuses/{sha}","languages_url":"https://api.github.com/repos/lannp/ftms/languages","stargazers_url":"https://api.github.com/repos/lannp/ftms/stargazers","contributors_url":"https://api.github.com/repos/lannp/ftms/contributors","subscribers_url":"https://api.github.com/repos/lannp/ftms/subscribers","subscription_url":"https://api.github.com/repos/lannp/ftms/subscription","commits_url":"https://api.github.com/repos/lannp/ftms/commits{/sha}","git_commits_url":"https://api.github.com/repos/lannp/ftms/git/commits{/sha}","comments_url":"https://api.github.com/repos/lannp/ftms/comments{/number}","issue_comment_url":"https://api.github.com/repos/lannp/ftms/issues/comments{/number}","contents_url":"https://api.github.com/repos/lannp/ftms/contents/{+path}","compare_url":"https://api.github.com/repos/lannp/ftms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lannp/ftms/merges","archive_url":"https://api.github.com/repos/lannp/ftms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lannp/ftms/downloads","issues_url":"https://api.github.com/repos/lannp/ftms/issues{/number}","pulls_url":"https://api.github.com/repos/lannp/ftms/pulls{/number}","milestones_url":"https://api.github.com/repos/lannp/ftms/milestones{/number}","notifications_url":"https://api.github.com/repos/lannp/ftms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lannp/ftms/labels{/name}","releases_url":"https://api.github.com/repos/lannp/ftms/releases{/id}","created_at":"2015-09-14T05:57:58Z","updated_at":"2015-09-10T03:49:19Z","pushed_at":"2015-09-16T08:15:07Z","git_url":"git://github.com/lannp/ftms.git","ssh_url":"git@github.com:lannp/ftms.git","clone_url":"https://github.com/lannp/ftms.git","svn_url":"https://github.com/lannp/ftms","homepage":null,"size":133,"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":"d24e731358327d52e82a26521a0745e6d734280e","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":42220671,"name":"ftms","full_name":"framgia/ftms","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/ftms","description":"Framgia Training Management System","fork":false,"url":"https://api.github.com/repos/framgia/ftms","forks_url":"https://api.github.com/repos/framgia/ftms/forks","keys_url":"https://api.github.com/repos/framgia/ftms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/ftms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/ftms/teams","hooks_url":"https://api.github.com/repos/framgia/ftms/hooks","issue_events_url":"https://api.github.com/repos/framgia/ftms/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/ftms/events","assignees_url":"https://api.github.com/repos/framgia/ftms/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/ftms/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/ftms/tags","blobs_url":"https://api.github.com/repos/framgia/ftms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/ftms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/ftms/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/ftms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/ftms/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/ftms/languages","stargazers_url":"https://api.github.com/repos/framgia/ftms/stargazers","contributors_url":"https://api.github.com/repos/framgia/ftms/contributors","subscribers_url":"https://api.github.com/repos/framgia/ftms/subscribers","subscription_url":"https://api.github.com/repos/framgia/ftms/subscription","commits_url":"https://api.github.com/repos/framgia/ftms/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/ftms/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/ftms/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/ftms/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/ftms/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/ftms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/ftms/merges","archive_url":"https://api.github.com/repos/framgia/ftms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/ftms/downloads","issues_url":"https://api.github.com/repos/framgia/ftms/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/ftms/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/ftms/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/ftms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/ftms/labels{/name}","releases_url":"https://api.github.com/repos/framgia/ftms/releases{/id}","created_at":"2015-09-10T03:49:19Z","updated_at":"2015-09-10T03:49:19Z","pushed_at":"2015-09-16T08:15:07Z","git_url":"git://github.com/framgia/ftms.git","ssh_url":"git@github.com:framgia/ftms.git","clone_url":"https://github.com/framgia/ftms.git","svn_url":"https://github.com/framgia/ftms","homepage":null,"size":998,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":5,"forks":10,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/ftms/pulls/5"},"html":{"href":"https://github.com/framgia/ftms/pull/5"},"issue":{"href":"https://api.github.com/repos/framgia/ftms/issues/5"},"comments":{"href":"https://api.github.com/repos/framgia/ftms/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/ftms/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/ftms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/ftms/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/ftms/statuses/11b8d58ef1fcfba716aea3836dee280c854f6526"}}}}