{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_35/pulls/comments/24312946","id":24312946,"diff_hunk":"@@ -0,0 +1,33 @@\n+class LessonsController < ApplicationController\n+  before_action :logged_in_user\n+\n+  def index\n+    @lessons = Lesson.all\n+  end\n+\n+  def new\n+    @lesson = Lesson.new category_id: params[:category_id], user_id: current_user.id\n+    @words = @lesson.category.words.order(\"RAND()\").limit 20\n+    @words.each do |word|","path":"app/controllers/lessons_controller.rb","position":11,"original_position":11,"commit_id":"d98f1205c1834df2c5febcefa3dedf8775d944be","original_commit_id":"d98f1205c1834df2c5febcefa3dedf8775d944be","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":"```\r\n@lesson.words << @words\r\n```","created_at":"2015-02-09T07:53:45Z","updated_at":"2015-02-09T07:53:45Z","html_url":"https://github.com/framgia/fels_35/pull/10#discussion_r24312946","pull_request_url":"https://api.github.com/repos/framgia/fels_35/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_35/pulls/comments/24312946"},"html":{"href":"https://github.com/framgia/fels_35/pull/10#discussion_r24312946"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_35/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_35/pulls/10","id":28894811,"html_url":"https://github.com/framgia/fels_35/pull/10","diff_url":"https://github.com/framgia/fels_35/pull/10.diff","patch_url":"https://github.com/framgia/fels_35/pull/10.patch","issue_url":"https://api.github.com/repos/framgia/fels_35/issues/10","number":10,"state":"open","locked":false,"title":"Boilerplate for generating Lessons","user":{"login":"QuangTranXuan","id":5158847,"avatar_url":"https://avatars.githubusercontent.com/u/5158847?v=3","gravatar_id":"","url":"https://api.github.com/users/QuangTranXuan","html_url":"https://github.com/QuangTranXuan","followers_url":"https://api.github.com/users/QuangTranXuan/followers","following_url":"https://api.github.com/users/QuangTranXuan/following{/other_user}","gists_url":"https://api.github.com/users/QuangTranXuan/gists{/gist_id}","starred_url":"https://api.github.com/users/QuangTranXuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuangTranXuan/subscriptions","organizations_url":"https://api.github.com/users/QuangTranXuan/orgs","repos_url":"https://api.github.com/users/QuangTranXuan/repos","events_url":"https://api.github.com/users/QuangTranXuan/events{/privacy}","received_events_url":"https://api.github.com/users/QuangTranXuan/received_events","type":"User","site_admin":false},"body":"Choose Category, Creating Lesson, Boilerplate for generating Lesson's Questions","created_at":"2015-02-09T03:45:28Z","updated_at":"2015-02-09T07:53:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae9b91639b4f8bcc5ee247109deb43421cef100a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_35/pulls/10/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_35/pulls/10/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_35/pulls/comments/{number}","comments_url":"https://api.github.com/repos/framgia/fels_35/issues/10/comments","statuses_url":"https://api.github.com/repos/framgia/fels_35/statuses/d98f1205c1834df2c5febcefa3dedf8775d944be","head":{"label":"QuangTranXuan:creating_lessons","ref":"creating_lessons","sha":"d98f1205c1834df2c5febcefa3dedf8775d944be","user":{"login":"QuangTranXuan","id":5158847,"avatar_url":"https://avatars.githubusercontent.com/u/5158847?v=3","gravatar_id":"","url":"https://api.github.com/users/QuangTranXuan","html_url":"https://github.com/QuangTranXuan","followers_url":"https://api.github.com/users/QuangTranXuan/followers","following_url":"https://api.github.com/users/QuangTranXuan/following{/other_user}","gists_url":"https://api.github.com/users/QuangTranXuan/gists{/gist_id}","starred_url":"https://api.github.com/users/QuangTranXuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuangTranXuan/subscriptions","organizations_url":"https://api.github.com/users/QuangTranXuan/orgs","repos_url":"https://api.github.com/users/QuangTranXuan/repos","events_url":"https://api.github.com/users/QuangTranXuan/events{/privacy}","received_events_url":"https://api.github.com/users/QuangTranXuan/received_events","type":"User","site_admin":false},"repo":{"id":30416938,"name":"fels_35","full_name":"QuangTranXuan/fels_35","owner":{"login":"QuangTranXuan","id":5158847,"avatar_url":"https://avatars.githubusercontent.com/u/5158847?v=3","gravatar_id":"","url":"https://api.github.com/users/QuangTranXuan","html_url":"https://github.com/QuangTranXuan","followers_url":"https://api.github.com/users/QuangTranXuan/followers","following_url":"https://api.github.com/users/QuangTranXuan/following{/other_user}","gists_url":"https://api.github.com/users/QuangTranXuan/gists{/gist_id}","starred_url":"https://api.github.com/users/QuangTranXuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuangTranXuan/subscriptions","organizations_url":"https://api.github.com/users/QuangTranXuan/orgs","repos_url":"https://api.github.com/users/QuangTranXuan/repos","events_url":"https://api.github.com/users/QuangTranXuan/events{/privacy}","received_events_url":"https://api.github.com/users/QuangTranXuan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/QuangTranXuan/fels_35","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/QuangTranXuan/fels_35","forks_url":"https://api.github.com/repos/QuangTranXuan/fels_35/forks","keys_url":"https://api.github.com/repos/QuangTranXuan/fels_35/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuangTranXuan/fels_35/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuangTranXuan/fels_35/teams","hooks_url":"https://api.github.com/repos/QuangTranXuan/fels_35/hooks","issue_events_url":"https://api.github.com/repos/QuangTranXuan/fels_35/issues/events{/number}","events_url":"https://api.github.com/repos/QuangTranXuan/fels_35/events","assignees_url":"https://api.github.com/repos/QuangTranXuan/fels_35/assignees{/user}","branches_url":"https://api.github.com/repos/QuangTranXuan/fels_35/branches{/branch}","tags_url":"https://api.github.com/repos/QuangTranXuan/fels_35/tags","blobs_url":"https://api.github.com/repos/QuangTranXuan/fels_35/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuangTranXuan/fels_35/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuangTranXuan/fels_35/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuangTranXuan/fels_35/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuangTranXuan/fels_35/statuses/{sha}","languages_url":"https://api.github.com/repos/QuangTranXuan/fels_35/languages","stargazers_url":"https://api.github.com/repos/QuangTranXuan/fels_35/stargazers","contributors_url":"https://api.github.com/repos/QuangTranXuan/fels_35/contributors","subscribers_url":"https://api.github.com/repos/QuangTranXuan/fels_35/subscribers","subscription_url":"https://api.github.com/repos/QuangTranXuan/fels_35/subscription","commits_url":"https://api.github.com/repos/QuangTranXuan/fels_35/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuangTranXuan/fels_35/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuangTranXuan/fels_35/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuangTranXuan/fels_35/issues/comments/{number}","contents_url":"https://api.github.com/repos/QuangTranXuan/fels_35/contents/{+path}","compare_url":"https://api.github.com/repos/QuangTranXuan/fels_35/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuangTranXuan/fels_35/merges","archive_url":"https://api.github.com/repos/QuangTranXuan/fels_35/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuangTranXuan/fels_35/downloads","issues_url":"https://api.github.com/repos/QuangTranXuan/fels_35/issues{/number}","pulls_url":"https://api.github.com/repos/QuangTranXuan/fels_35/pulls{/number}","milestones_url":"https://api.github.com/repos/QuangTranXuan/fels_35/milestones{/number}","notifications_url":"https://api.github.com/repos/QuangTranXuan/fels_35/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuangTranXuan/fels_35/labels{/name}","releases_url":"https://api.github.com/repos/QuangTranXuan/fels_35/releases{/id}","created_at":"2015-02-06T14:50:37Z","updated_at":"2015-01-24T12:02:13Z","pushed_at":"2015-02-09T03:42:41Z","git_url":"git://github.com/QuangTranXuan/fels_35.git","ssh_url":"git@github.com:QuangTranXuan/fels_35.git","clone_url":"https://github.com/QuangTranXuan/fels_35.git","svn_url":"https://github.com/QuangTranXuan/fels_35","homepage":null,"size":194,"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":"c6aae68e1170e20f4a0ccbe0a78ff3c104e02e2a","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":29775206,"name":"fels_35","full_name":"framgia/fels_35","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_35","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_35","forks_url":"https://api.github.com/repos/framgia/fels_35/forks","keys_url":"https://api.github.com/repos/framgia/fels_35/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_35/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_35/teams","hooks_url":"https://api.github.com/repos/framgia/fels_35/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_35/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_35/events","assignees_url":"https://api.github.com/repos/framgia/fels_35/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_35/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_35/tags","blobs_url":"https://api.github.com/repos/framgia/fels_35/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_35/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_35/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_35/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_35/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_35/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_35/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_35/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_35/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_35/subscription","commits_url":"https://api.github.com/repos/framgia/fels_35/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_35/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_35/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_35/issues/comments/{number}","contents_url":"https://api.github.com/repos/framgia/fels_35/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_35/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_35/merges","archive_url":"https://api.github.com/repos/framgia/fels_35/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_35/downloads","issues_url":"https://api.github.com/repos/framgia/fels_35/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_35/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_35/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_35/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_35/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_35/releases{/id}","created_at":"2015-01-24T12:02:13Z","updated_at":"2015-01-24T12:02:13Z","pushed_at":"2015-02-09T01:16:12Z","git_url":"git://github.com/framgia/fels_35.git","ssh_url":"git@github.com:framgia/fels_35.git","clone_url":"https://github.com/framgia/fels_35.git","svn_url":"https://github.com/framgia/fels_35","homepage":null,"size":301,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_35/pulls/10"},"html":{"href":"https://github.com/framgia/fels_35/pull/10"},"issue":{"href":"https://api.github.com/repos/framgia/fels_35/issues/10"},"comments":{"href":"https://api.github.com/repos/framgia/fels_35/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_35/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_35/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_35/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_35/statuses/d98f1205c1834df2c5febcefa3dedf8775d944be"}}}}