{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_47/pulls/comments/28659642","id":28659642,"diff_hunk":"@@ -0,0 +1,42 @@\n+class LessonsController < ApplicationController\n+  def create\n+    answers = params[:answer]\n+    count = 0\n+    answers.each do |answer|\n+      learnedWord = LearnedWord.find_or_initialize_by(\n+        user_id: current_user.id,\n+        word_id: answer.first,\n+      )\n+      if Answer.find(answer.second).correct\n+        learnedWord.learned = true\n+        count += 1 \n+      else\n+        learnedWord.learned = false\n+      end\n+      learnedWord.save\n+    end\n+    @mark = count\n+    Lesson.create!(","path":"app/controllers/lessons_controller.rb","position":19,"original_position":19,"commit_id":"58ac0346d3e2e4eaeeb6df54c4cd2ff102083e47","original_commit_id":"58ac0346d3e2e4eaeeb6df54c4cd2ff102083e47","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":"strong params???","created_at":"2015-04-20T01:16:46Z","updated_at":"2015-04-20T01:16:46Z","html_url":"https://github.com/framgia/fels_47/pull/8#discussion_r28659642","pull_request_url":"https://api.github.com/repos/framgia/fels_47/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_47/pulls/comments/28659642"},"html":{"href":"https://github.com/framgia/fels_47/pull/8#discussion_r28659642"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_47/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_47/pulls/8","id":33629785,"html_url":"https://github.com/framgia/fels_47/pull/8","diff_url":"https://github.com/framgia/fels_47/pull/8.diff","patch_url":"https://github.com/framgia/fels_47/pull/8.patch","issue_url":"https://api.github.com/repos/framgia/fels_47/issues/8","number":8,"state":"open","locked":false,"title":"Category index. Create lesson and result","user":{"login":"DungNQ-Framgia","id":5467203,"avatar_url":"https://avatars.githubusercontent.com/u/5467203?v=3","gravatar_id":"","url":"https://api.github.com/users/DungNQ-Framgia","html_url":"https://github.com/DungNQ-Framgia","followers_url":"https://api.github.com/users/DungNQ-Framgia/followers","following_url":"https://api.github.com/users/DungNQ-Framgia/following{/other_user}","gists_url":"https://api.github.com/users/DungNQ-Framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/DungNQ-Framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DungNQ-Framgia/subscriptions","organizations_url":"https://api.github.com/users/DungNQ-Framgia/orgs","repos_url":"https://api.github.com/users/DungNQ-Framgia/repos","events_url":"https://api.github.com/users/DungNQ-Framgia/events{/privacy}","received_events_url":"https://api.github.com/users/DungNQ-Framgia/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-20T01:08:24Z","updated_at":"2015-04-20T01:16:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a03b2c3f0b31c4ccc602bd00b28f620e98539208","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_47/pulls/8/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_47/pulls/8/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_47/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_47/issues/8/comments","statuses_url":"https://api.github.com/repos/framgia/fels_47/statuses/58ac0346d3e2e4eaeeb6df54c4cd2ff102083e47","head":{"label":"DungNQ-Framgia:task/lesson_and_result","ref":"task/lesson_and_result","sha":"58ac0346d3e2e4eaeeb6df54c4cd2ff102083e47","user":{"login":"DungNQ-Framgia","id":5467203,"avatar_url":"https://avatars.githubusercontent.com/u/5467203?v=3","gravatar_id":"","url":"https://api.github.com/users/DungNQ-Framgia","html_url":"https://github.com/DungNQ-Framgia","followers_url":"https://api.github.com/users/DungNQ-Framgia/followers","following_url":"https://api.github.com/users/DungNQ-Framgia/following{/other_user}","gists_url":"https://api.github.com/users/DungNQ-Framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/DungNQ-Framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DungNQ-Framgia/subscriptions","organizations_url":"https://api.github.com/users/DungNQ-Framgia/orgs","repos_url":"https://api.github.com/users/DungNQ-Framgia/repos","events_url":"https://api.github.com/users/DungNQ-Framgia/events{/privacy}","received_events_url":"https://api.github.com/users/DungNQ-Framgia/received_events","type":"User","site_admin":false},"repo":{"id":33580426,"name":"fels_47","full_name":"DungNQ-Framgia/fels_47","owner":{"login":"DungNQ-Framgia","id":5467203,"avatar_url":"https://avatars.githubusercontent.com/u/5467203?v=3","gravatar_id":"","url":"https://api.github.com/users/DungNQ-Framgia","html_url":"https://github.com/DungNQ-Framgia","followers_url":"https://api.github.com/users/DungNQ-Framgia/followers","following_url":"https://api.github.com/users/DungNQ-Framgia/following{/other_user}","gists_url":"https://api.github.com/users/DungNQ-Framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/DungNQ-Framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DungNQ-Framgia/subscriptions","organizations_url":"https://api.github.com/users/DungNQ-Framgia/orgs","repos_url":"https://api.github.com/users/DungNQ-Framgia/repos","events_url":"https://api.github.com/users/DungNQ-Framgia/events{/privacy}","received_events_url":"https://api.github.com/users/DungNQ-Framgia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DungNQ-Framgia/fels_47","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/DungNQ-Framgia/fels_47","forks_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/forks","keys_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/teams","hooks_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/hooks","issue_events_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/issues/events{/number}","events_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/events","assignees_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/assignees{/user}","branches_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/branches{/branch}","tags_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/tags","blobs_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/git/refs{/sha}","trees_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/statuses/{sha}","languages_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/languages","stargazers_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/stargazers","contributors_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/contributors","subscribers_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/subscribers","subscription_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/subscription","commits_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/commits{/sha}","git_commits_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/git/commits{/sha}","comments_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/comments{/number}","issue_comment_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/issues/comments{/number}","contents_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/contents/{+path}","compare_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/merges","archive_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/downloads","issues_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/issues{/number}","pulls_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/pulls{/number}","milestones_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/milestones{/number}","notifications_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/labels{/name}","releases_url":"https://api.github.com/repos/DungNQ-Framgia/fels_47/releases{/id}","created_at":"2015-04-08T02:35:23Z","updated_at":"2015-02-04T11:29:24Z","pushed_at":"2015-04-20T01:06:19Z","git_url":"git://github.com/DungNQ-Framgia/fels_47.git","ssh_url":"git@github.com:DungNQ-Framgia/fels_47.git","clone_url":"https://github.com/DungNQ-Framgia/fels_47.git","svn_url":"https://github.com/DungNQ-Framgia/fels_47","homepage":null,"size":140,"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":"2afed9dd250ff2c12b92f3702bed595cdaeef017","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":30295687,"name":"fels_47","full_name":"framgia/fels_47","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_47","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_47","forks_url":"https://api.github.com/repos/framgia/fels_47/forks","keys_url":"https://api.github.com/repos/framgia/fels_47/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_47/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_47/teams","hooks_url":"https://api.github.com/repos/framgia/fels_47/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_47/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_47/events","assignees_url":"https://api.github.com/repos/framgia/fels_47/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_47/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_47/tags","blobs_url":"https://api.github.com/repos/framgia/fels_47/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_47/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_47/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_47/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_47/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_47/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_47/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_47/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_47/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_47/subscription","commits_url":"https://api.github.com/repos/framgia/fels_47/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_47/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_47/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_47/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_47/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_47/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_47/merges","archive_url":"https://api.github.com/repos/framgia/fels_47/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_47/downloads","issues_url":"https://api.github.com/repos/framgia/fels_47/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_47/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_47/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_47/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_47/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_47/releases{/id}","created_at":"2015-02-04T11:29:24Z","updated_at":"2015-02-04T11:29:24Z","pushed_at":"2015-04-20T01:08:24Z","git_url":"git://github.com/framgia/fels_47.git","ssh_url":"git@github.com:framgia/fels_47.git","clone_url":"https://github.com/framgia/fels_47.git","svn_url":"https://github.com/framgia/fels_47","homepage":null,"size":664,"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_47/pulls/8"},"html":{"href":"https://github.com/framgia/fels_47/pull/8"},"issue":{"href":"https://api.github.com/repos/framgia/fels_47/issues/8"},"comments":{"href":"https://api.github.com/repos/framgia/fels_47/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_47/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_47/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_47/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_47/statuses/58ac0346d3e2e4eaeeb6df54c4cd2ff102083e47"}}}}