{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_185/pulls/comments/81270814","pull_request_review_id":2262538,"id":81270814,"diff_hunk":"@@ -1,18 +1,42 @@\n class LessonsController < ApplicationController\n+  before_action :logged_in_user, only: [:index, :show, :edit, :update]\n+  before_action :load_lesson, only: [:edit, :update]\n+\n+  def edit\n+    @words = @lesson.words\n+  end\n+\n+  def update\n+    if @lesson.update_attributes lesson_params\n+      flash[:success] = t \"lesson.finish_message\"\n+      redirect_to categories_path\n+    else\n+      render :edit\n+    end\n+  end\n \n   def create\n     @lesson = current_user.lessons.build lesson_params\n     if @lesson.save\n-      flash[:success] = t \"lesson.success_create\"\n+      flash[:success] = t \"lesson.success_create_message\"\n+      redirect_to edit_lesson_path @lesson","path":"app/controllers/lessons_controller.rb","position":23,"original_position":23,"commit_id":"b2c6bf8e914dfac3334134c1fc3edaaaca28494f","original_commit_id":"b2c6bf8e914dfac3334134c1fc3edaaaca28494f","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":"save xong rồi thì vào trang show chứ sao vào trang edit nhỉ ?","created_at":"2016-09-30T02:34:55Z","updated_at":"2016-09-30T02:36:30Z","html_url":"https://github.com/framgia/fels_185/pull/14#discussion_r81270814","pull_request_url":"https://api.github.com/repos/framgia/fels_185/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_185/pulls/comments/81270814"},"html":{"href":"https://github.com/framgia/fels_185/pull/14#discussion_r81270814"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_185/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_185/pulls/14","id":87295843,"html_url":"https://github.com/framgia/fels_185/pull/14","diff_url":"https://github.com/framgia/fels_185/pull/14.diff","patch_url":"https://github.com/framgia/fels_185/pull/14.patch","issue_url":"https://api.github.com/repos/framgia/fels_185/issues/14","number":14,"state":"open","locked":false,"title":"78905 User do lesson","user":{"login":"dothidiemthao","id":21377118,"avatar_url":"https://avatars.githubusercontent.com/u/21377118?v=3","gravatar_id":"","url":"https://api.github.com/users/dothidiemthao","html_url":"https://github.com/dothidiemthao","followers_url":"https://api.github.com/users/dothidiemthao/followers","following_url":"https://api.github.com/users/dothidiemthao/following{/other_user}","gists_url":"https://api.github.com/users/dothidiemthao/gists{/gist_id}","starred_url":"https://api.github.com/users/dothidiemthao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dothidiemthao/subscriptions","organizations_url":"https://api.github.com/users/dothidiemthao/orgs","repos_url":"https://api.github.com/users/dothidiemthao/repos","events_url":"https://api.github.com/users/dothidiemthao/events{/privacy}","received_events_url":"https://api.github.com/users/dothidiemthao/received_events","type":"User","site_admin":false},"body":"78905 User do lesson","created_at":"2016-09-29T11:40:14Z","updated_at":"2016-09-30T02:36:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5d7029de6deb40f1ca70ba19adead898f1dd9ec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_185/pulls/14/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_185/pulls/14/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_185/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_185/issues/14/comments","statuses_url":"https://api.github.com/repos/framgia/fels_185/statuses/b2c6bf8e914dfac3334134c1fc3edaaaca28494f","head":{"label":"dothidiemthao:78905-User-do-lesson","ref":"78905-User-do-lesson","sha":"b2c6bf8e914dfac3334134c1fc3edaaaca28494f","user":{"login":"dothidiemthao","id":21377118,"avatar_url":"https://avatars.githubusercontent.com/u/21377118?v=3","gravatar_id":"","url":"https://api.github.com/users/dothidiemthao","html_url":"https://github.com/dothidiemthao","followers_url":"https://api.github.com/users/dothidiemthao/followers","following_url":"https://api.github.com/users/dothidiemthao/following{/other_user}","gists_url":"https://api.github.com/users/dothidiemthao/gists{/gist_id}","starred_url":"https://api.github.com/users/dothidiemthao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dothidiemthao/subscriptions","organizations_url":"https://api.github.com/users/dothidiemthao/orgs","repos_url":"https://api.github.com/users/dothidiemthao/repos","events_url":"https://api.github.com/users/dothidiemthao/events{/privacy}","received_events_url":"https://api.github.com/users/dothidiemthao/received_events","type":"User","site_admin":false},"repo":{"id":68994942,"name":"fels_185","full_name":"dothidiemthao/fels_185","owner":{"login":"dothidiemthao","id":21377118,"avatar_url":"https://avatars.githubusercontent.com/u/21377118?v=3","gravatar_id":"","url":"https://api.github.com/users/dothidiemthao","html_url":"https://github.com/dothidiemthao","followers_url":"https://api.github.com/users/dothidiemthao/followers","following_url":"https://api.github.com/users/dothidiemthao/following{/other_user}","gists_url":"https://api.github.com/users/dothidiemthao/gists{/gist_id}","starred_url":"https://api.github.com/users/dothidiemthao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dothidiemthao/subscriptions","organizations_url":"https://api.github.com/users/dothidiemthao/orgs","repos_url":"https://api.github.com/users/dothidiemthao/repos","events_url":"https://api.github.com/users/dothidiemthao/events{/privacy}","received_events_url":"https://api.github.com/users/dothidiemthao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dothidiemthao/fels_185","description":"Framgia E Learning System (Training)","fork":true,"url":"https://api.github.com/repos/dothidiemthao/fels_185","forks_url":"https://api.github.com/repos/dothidiemthao/fels_185/forks","keys_url":"https://api.github.com/repos/dothidiemthao/fels_185/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dothidiemthao/fels_185/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dothidiemthao/fels_185/teams","hooks_url":"https://api.github.com/repos/dothidiemthao/fels_185/hooks","issue_events_url":"https://api.github.com/repos/dothidiemthao/fels_185/issues/events{/number}","events_url":"https://api.github.com/repos/dothidiemthao/fels_185/events","assignees_url":"https://api.github.com/repos/dothidiemthao/fels_185/assignees{/user}","branches_url":"https://api.github.com/repos/dothidiemthao/fels_185/branches{/branch}","tags_url":"https://api.github.com/repos/dothidiemthao/fels_185/tags","blobs_url":"https://api.github.com/repos/dothidiemthao/fels_185/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dothidiemthao/fels_185/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dothidiemthao/fels_185/git/refs{/sha}","trees_url":"https://api.github.com/repos/dothidiemthao/fels_185/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dothidiemthao/fels_185/statuses/{sha}","languages_url":"https://api.github.com/repos/dothidiemthao/fels_185/languages","stargazers_url":"https://api.github.com/repos/dothidiemthao/fels_185/stargazers","contributors_url":"https://api.github.com/repos/dothidiemthao/fels_185/contributors","subscribers_url":"https://api.github.com/repos/dothidiemthao/fels_185/subscribers","subscription_url":"https://api.github.com/repos/dothidiemthao/fels_185/subscription","commits_url":"https://api.github.com/repos/dothidiemthao/fels_185/commits{/sha}","git_commits_url":"https://api.github.com/repos/dothidiemthao/fels_185/git/commits{/sha}","comments_url":"https://api.github.com/repos/dothidiemthao/fels_185/comments{/number}","issue_comment_url":"https://api.github.com/repos/dothidiemthao/fels_185/issues/comments{/number}","contents_url":"https://api.github.com/repos/dothidiemthao/fels_185/contents/{+path}","compare_url":"https://api.github.com/repos/dothidiemthao/fels_185/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dothidiemthao/fels_185/merges","archive_url":"https://api.github.com/repos/dothidiemthao/fels_185/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dothidiemthao/fels_185/downloads","issues_url":"https://api.github.com/repos/dothidiemthao/fels_185/issues{/number}","pulls_url":"https://api.github.com/repos/dothidiemthao/fels_185/pulls{/number}","milestones_url":"https://api.github.com/repos/dothidiemthao/fels_185/milestones{/number}","notifications_url":"https://api.github.com/repos/dothidiemthao/fels_185/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dothidiemthao/fels_185/labels{/name}","releases_url":"https://api.github.com/repos/dothidiemthao/fels_185/releases{/id}","deployments_url":"https://api.github.com/repos/dothidiemthao/fels_185/deployments","created_at":"2016-09-23T06:17:55Z","updated_at":"2016-09-19T02:00:11Z","pushed_at":"2016-09-30T02:10:19Z","git_url":"git://github.com/dothidiemthao/fels_185.git","ssh_url":"git@github.com:dothidiemthao/fels_185.git","clone_url":"https://github.com/dothidiemthao/fels_185.git","svn_url":"https://github.com/dothidiemthao/fels_185","homepage":null,"size":61,"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":"c7c8a9ed641f9b8a55323a711a25033adb0258f7","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":68560117,"name":"fels_185","full_name":"framgia/fels_185","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_185","description":"Framgia E Learning System (Training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_185","forks_url":"https://api.github.com/repos/framgia/fels_185/forks","keys_url":"https://api.github.com/repos/framgia/fels_185/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_185/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_185/teams","hooks_url":"https://api.github.com/repos/framgia/fels_185/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_185/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_185/events","assignees_url":"https://api.github.com/repos/framgia/fels_185/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_185/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_185/tags","blobs_url":"https://api.github.com/repos/framgia/fels_185/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_185/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_185/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_185/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_185/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_185/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_185/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_185/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_185/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_185/subscription","commits_url":"https://api.github.com/repos/framgia/fels_185/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_185/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_185/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_185/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_185/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_185/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_185/merges","archive_url":"https://api.github.com/repos/framgia/fels_185/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_185/downloads","issues_url":"https://api.github.com/repos/framgia/fels_185/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_185/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_185/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_185/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_185/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_185/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fels_185/deployments","created_at":"2016-09-19T02:00:11Z","updated_at":"2016-09-19T02:00:11Z","pushed_at":"2016-09-30T02:10:20Z","git_url":"git://github.com/framgia/fels_185.git","ssh_url":"git@github.com:framgia/fels_185.git","clone_url":"https://github.com/framgia/fels_185.git","svn_url":"https://github.com/framgia/fels_185","homepage":null,"size":60,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_185/pulls/14"},"html":{"href":"https://github.com/framgia/fels_185/pull/14"},"issue":{"href":"https://api.github.com/repos/framgia/fels_185/issues/14"},"comments":{"href":"https://api.github.com/repos/framgia/fels_185/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_185/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_185/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_185/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_185/statuses/b2c6bf8e914dfac3334134c1fc3edaaaca28494f"}}}}
{"actor":{"display_login":"nvtanh"}}