{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_222/pulls/comments/93417323","pull_request_review_id":13942614,"id":93417323,"diff_hunk":"@@ -0,0 +1,33 @@\n+class LessonsController < ApplicationController\n+  before_action :logged_in_user\n+\n+  def show\n+    @lesson = Lesson.find_by id: params[:id]\n+  end\n+\n+  def create\n+    @lesson = current_user.lessons.create lesson\n+    if @lesson\n+      redirect_to [@lesson.category, @lesson]\n+    else\n+      flash[:danger] = t \"dont_create_lesson\"\n+      redirect_to categories_url\n+    end\n+  end\n+\n+  def update\n+    @lesson = Lesson.find_by id: params[:id]","path":"app/controllers/lessons_controller.rb","position":19,"original_position":19,"commit_id":"712da4e10fd864f046f3619450cc34d9e77ba26d","original_commit_id":"712da4e10fd864f046f3619450cc34d9e77ba26d","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":"lặp code với hàm show","created_at":"2016-12-21T10:59:02Z","updated_at":"2016-12-21T10:59:53Z","html_url":"https://github.com/framgia/fels_222/pull/15#discussion_r93417323","pull_request_url":"https://api.github.com/repos/framgia/fels_222/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_222/pulls/comments/93417323"},"html":{"href":"https://github.com/framgia/fels_222/pull/15#discussion_r93417323"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_222/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_222/pulls/15","id":98869269,"html_url":"https://github.com/framgia/fels_222/pull/15","diff_url":"https://github.com/framgia/fels_222/pull/15.diff","patch_url":"https://github.com/framgia/fels_222/pull/15.patch","issue_url":"https://api.github.com/repos/framgia/fels_222/issues/15","number":15,"state":"open","locked":false,"title":"create lesson","user":{"login":"JunKimBK","id":16820534,"avatar_url":"https://avatars.githubusercontent.com/u/16820534?v=3","gravatar_id":"","url":"https://api.github.com/users/JunKimBK","html_url":"https://github.com/JunKimBK","followers_url":"https://api.github.com/users/JunKimBK/followers","following_url":"https://api.github.com/users/JunKimBK/following{/other_user}","gists_url":"https://api.github.com/users/JunKimBK/gists{/gist_id}","starred_url":"https://api.github.com/users/JunKimBK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JunKimBK/subscriptions","organizations_url":"https://api.github.com/users/JunKimBK/orgs","repos_url":"https://api.github.com/users/JunKimBK/repos","events_url":"https://api.github.com/users/JunKimBK/events{/privacy}","received_events_url":"https://api.github.com/users/JunKimBK/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-21T04:14:38Z","updated_at":"2016-12-21T10:59:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0366c7cec2c600b1bd476991953c2a92aa106a66","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_222/pulls/15/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_222/pulls/15/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_222/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_222/issues/15/comments","statuses_url":"https://api.github.com/repos/framgia/fels_222/statuses/712da4e10fd864f046f3619450cc34d9e77ba26d","head":{"label":"JunKimBK:create-lesson","ref":"create-lesson","sha":"712da4e10fd864f046f3619450cc34d9e77ba26d","user":{"login":"JunKimBK","id":16820534,"avatar_url":"https://avatars.githubusercontent.com/u/16820534?v=3","gravatar_id":"","url":"https://api.github.com/users/JunKimBK","html_url":"https://github.com/JunKimBK","followers_url":"https://api.github.com/users/JunKimBK/followers","following_url":"https://api.github.com/users/JunKimBK/following{/other_user}","gists_url":"https://api.github.com/users/JunKimBK/gists{/gist_id}","starred_url":"https://api.github.com/users/JunKimBK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JunKimBK/subscriptions","organizations_url":"https://api.github.com/users/JunKimBK/orgs","repos_url":"https://api.github.com/users/JunKimBK/repos","events_url":"https://api.github.com/users/JunKimBK/events{/privacy}","received_events_url":"https://api.github.com/users/JunKimBK/received_events","type":"User","site_admin":false},"repo":{"id":75380526,"name":"fels_222","full_name":"JunKimBK/fels_222","owner":{"login":"JunKimBK","id":16820534,"avatar_url":"https://avatars.githubusercontent.com/u/16820534?v=3","gravatar_id":"","url":"https://api.github.com/users/JunKimBK","html_url":"https://github.com/JunKimBK","followers_url":"https://api.github.com/users/JunKimBK/followers","following_url":"https://api.github.com/users/JunKimBK/following{/other_user}","gists_url":"https://api.github.com/users/JunKimBK/gists{/gist_id}","starred_url":"https://api.github.com/users/JunKimBK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JunKimBK/subscriptions","organizations_url":"https://api.github.com/users/JunKimBK/orgs","repos_url":"https://api.github.com/users/JunKimBK/repos","events_url":"https://api.github.com/users/JunKimBK/events{/privacy}","received_events_url":"https://api.github.com/users/JunKimBK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JunKimBK/fels_222","description":null,"fork":true,"url":"https://api.github.com/repos/JunKimBK/fels_222","forks_url":"https://api.github.com/repos/JunKimBK/fels_222/forks","keys_url":"https://api.github.com/repos/JunKimBK/fels_222/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JunKimBK/fels_222/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JunKimBK/fels_222/teams","hooks_url":"https://api.github.com/repos/JunKimBK/fels_222/hooks","issue_events_url":"https://api.github.com/repos/JunKimBK/fels_222/issues/events{/number}","events_url":"https://api.github.com/repos/JunKimBK/fels_222/events","assignees_url":"https://api.github.com/repos/JunKimBK/fels_222/assignees{/user}","branches_url":"https://api.github.com/repos/JunKimBK/fels_222/branches{/branch}","tags_url":"https://api.github.com/repos/JunKimBK/fels_222/tags","blobs_url":"https://api.github.com/repos/JunKimBK/fels_222/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JunKimBK/fels_222/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JunKimBK/fels_222/git/refs{/sha}","trees_url":"https://api.github.com/repos/JunKimBK/fels_222/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JunKimBK/fels_222/statuses/{sha}","languages_url":"https://api.github.com/repos/JunKimBK/fels_222/languages","stargazers_url":"https://api.github.com/repos/JunKimBK/fels_222/stargazers","contributors_url":"https://api.github.com/repos/JunKimBK/fels_222/contributors","subscribers_url":"https://api.github.com/repos/JunKimBK/fels_222/subscribers","subscription_url":"https://api.github.com/repos/JunKimBK/fels_222/subscription","commits_url":"https://api.github.com/repos/JunKimBK/fels_222/commits{/sha}","git_commits_url":"https://api.github.com/repos/JunKimBK/fels_222/git/commits{/sha}","comments_url":"https://api.github.com/repos/JunKimBK/fels_222/comments{/number}","issue_comment_url":"https://api.github.com/repos/JunKimBK/fels_222/issues/comments{/number}","contents_url":"https://api.github.com/repos/JunKimBK/fels_222/contents/{+path}","compare_url":"https://api.github.com/repos/JunKimBK/fels_222/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JunKimBK/fels_222/merges","archive_url":"https://api.github.com/repos/JunKimBK/fels_222/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JunKimBK/fels_222/downloads","issues_url":"https://api.github.com/repos/JunKimBK/fels_222/issues{/number}","pulls_url":"https://api.github.com/repos/JunKimBK/fels_222/pulls{/number}","milestones_url":"https://api.github.com/repos/JunKimBK/fels_222/milestones{/number}","notifications_url":"https://api.github.com/repos/JunKimBK/fels_222/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JunKimBK/fels_222/labels{/name}","releases_url":"https://api.github.com/repos/JunKimBK/fels_222/releases{/id}","deployments_url":"https://api.github.com/repos/JunKimBK/fels_222/deployments","created_at":"2016-12-02T09:20:22Z","updated_at":"2016-12-01T08:29:43Z","pushed_at":"2016-12-21T04:26:29Z","git_url":"git://github.com/JunKimBK/fels_222.git","ssh_url":"git@github.com:JunKimBK/fels_222.git","clone_url":"https://github.com/JunKimBK/fels_222.git","svn_url":"https://github.com/JunKimBK/fels_222","homepage":null,"size":74,"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":"develop"}},"base":{"label":"framgia:develop","ref":"develop","sha":"5e221b152a9539367e621125ab499a592317243b","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":75271784,"name":"fels_222","full_name":"framgia/fels_222","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/fels_222","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/fels_222","forks_url":"https://api.github.com/repos/framgia/fels_222/forks","keys_url":"https://api.github.com/repos/framgia/fels_222/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_222/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_222/teams","hooks_url":"https://api.github.com/repos/framgia/fels_222/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_222/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_222/events","assignees_url":"https://api.github.com/repos/framgia/fels_222/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_222/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_222/tags","blobs_url":"https://api.github.com/repos/framgia/fels_222/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_222/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_222/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_222/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_222/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_222/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_222/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_222/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_222/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_222/subscription","commits_url":"https://api.github.com/repos/framgia/fels_222/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_222/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_222/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_222/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_222/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_222/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_222/merges","archive_url":"https://api.github.com/repos/framgia/fels_222/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_222/downloads","issues_url":"https://api.github.com/repos/framgia/fels_222/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_222/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_222/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_222/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_222/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_222/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fels_222/deployments","created_at":"2016-12-01T08:29:43Z","updated_at":"2016-12-06T02:46:25Z","pushed_at":"2016-12-21T04:26:30Z","git_url":"git://github.com/framgia/fels_222.git","ssh_url":"git@github.com:framgia/fels_222.git","clone_url":"https://github.com/framgia/fels_222.git","svn_url":"https://github.com/framgia/fels_222","homepage":null,"size":58,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_222/pulls/15"},"html":{"href":"https://github.com/framgia/fels_222/pull/15"},"issue":{"href":"https://api.github.com/repos/framgia/fels_222/issues/15"},"comments":{"href":"https://api.github.com/repos/framgia/fels_222/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_222/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_222/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_222/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_222/statuses/712da4e10fd864f046f3619450cc34d9e77ba26d"}}}}
{"actor":{"display_login":"nvtanh"}}