{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_81/pulls/comments/43343894","id":43343894,"diff_hunk":"@@ -9,6 +9,12 @@ class Lesson < ActiveRecord::Base\n \n   before_create :init_words\n \n+  def words_correct\n+    correct = self.results.select{|item| !item.answer.nil? && item.answer.correct }.count\n+    total = self.words.count","path":"app/models/lesson.rb","position":6,"original_position":6,"commit_id":"7319a575dad8c16bb2205ee84f7ba3b68b5984a9","original_commit_id":"7319a575dad8c16bb2205ee84f7ba3b68b5984a9","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ó size, length, count, em nên dùng cái nào? ","created_at":"2015-10-29T02:49:23Z","updated_at":"2015-10-29T02:49:23Z","html_url":"https://github.com/framgia/fels_81/pull/18#discussion_r43343894","pull_request_url":"https://api.github.com/repos/framgia/fels_81/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_81/pulls/comments/43343894"},"html":{"href":"https://github.com/framgia/fels_81/pull/18#discussion_r43343894"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_81/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_81/pulls/18","id":48970494,"html_url":"https://github.com/framgia/fels_81/pull/18","diff_url":"https://github.com/framgia/fels_81/pull/18.diff","patch_url":"https://github.com/framgia/fels_81/pull/18.patch","issue_url":"https://api.github.com/repos/framgia/fels_81/issues/18","number":18,"state":"open","locked":false,"title":"Task 42444","user":{"login":"hnam2812","id":7136027,"avatar_url":"https://avatars.githubusercontent.com/u/7136027?v=3","gravatar_id":"","url":"https://api.github.com/users/hnam2812","html_url":"https://github.com/hnam2812","followers_url":"https://api.github.com/users/hnam2812/followers","following_url":"https://api.github.com/users/hnam2812/following{/other_user}","gists_url":"https://api.github.com/users/hnam2812/gists{/gist_id}","starred_url":"https://api.github.com/users/hnam2812/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnam2812/subscriptions","organizations_url":"https://api.github.com/users/hnam2812/orgs","repos_url":"https://api.github.com/users/hnam2812/repos","events_url":"https://api.github.com/users/hnam2812/events{/privacy}","received_events_url":"https://api.github.com/users/hnam2812/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-28T06:54:00Z","updated_at":"2015-10-29T02:49:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48448ab88f1994218268c32553088ecbbb1bc6a1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_81/pulls/18/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_81/pulls/18/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_81/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_81/issues/18/comments","statuses_url":"https://api.github.com/repos/framgia/fels_81/statuses/7319a575dad8c16bb2205ee84f7ba3b68b5984a9","head":{"label":"hnam2812:task_42444","ref":"task_42444","sha":"7319a575dad8c16bb2205ee84f7ba3b68b5984a9","user":{"login":"hnam2812","id":7136027,"avatar_url":"https://avatars.githubusercontent.com/u/7136027?v=3","gravatar_id":"","url":"https://api.github.com/users/hnam2812","html_url":"https://github.com/hnam2812","followers_url":"https://api.github.com/users/hnam2812/followers","following_url":"https://api.github.com/users/hnam2812/following{/other_user}","gists_url":"https://api.github.com/users/hnam2812/gists{/gist_id}","starred_url":"https://api.github.com/users/hnam2812/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnam2812/subscriptions","organizations_url":"https://api.github.com/users/hnam2812/orgs","repos_url":"https://api.github.com/users/hnam2812/repos","events_url":"https://api.github.com/users/hnam2812/events{/privacy}","received_events_url":"https://api.github.com/users/hnam2812/received_events","type":"User","site_admin":false},"repo":{"id":44297899,"name":"fels_81","full_name":"hnam2812/fels_81","owner":{"login":"hnam2812","id":7136027,"avatar_url":"https://avatars.githubusercontent.com/u/7136027?v=3","gravatar_id":"","url":"https://api.github.com/users/hnam2812","html_url":"https://github.com/hnam2812","followers_url":"https://api.github.com/users/hnam2812/followers","following_url":"https://api.github.com/users/hnam2812/following{/other_user}","gists_url":"https://api.github.com/users/hnam2812/gists{/gist_id}","starred_url":"https://api.github.com/users/hnam2812/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnam2812/subscriptions","organizations_url":"https://api.github.com/users/hnam2812/orgs","repos_url":"https://api.github.com/users/hnam2812/repos","events_url":"https://api.github.com/users/hnam2812/events{/privacy}","received_events_url":"https://api.github.com/users/hnam2812/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hnam2812/fels_81","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/hnam2812/fels_81","forks_url":"https://api.github.com/repos/hnam2812/fels_81/forks","keys_url":"https://api.github.com/repos/hnam2812/fels_81/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hnam2812/fels_81/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hnam2812/fels_81/teams","hooks_url":"https://api.github.com/repos/hnam2812/fels_81/hooks","issue_events_url":"https://api.github.com/repos/hnam2812/fels_81/issues/events{/number}","events_url":"https://api.github.com/repos/hnam2812/fels_81/events","assignees_url":"https://api.github.com/repos/hnam2812/fels_81/assignees{/user}","branches_url":"https://api.github.com/repos/hnam2812/fels_81/branches{/branch}","tags_url":"https://api.github.com/repos/hnam2812/fels_81/tags","blobs_url":"https://api.github.com/repos/hnam2812/fels_81/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hnam2812/fels_81/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hnam2812/fels_81/git/refs{/sha}","trees_url":"https://api.github.com/repos/hnam2812/fels_81/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hnam2812/fels_81/statuses/{sha}","languages_url":"https://api.github.com/repos/hnam2812/fels_81/languages","stargazers_url":"https://api.github.com/repos/hnam2812/fels_81/stargazers","contributors_url":"https://api.github.com/repos/hnam2812/fels_81/contributors","subscribers_url":"https://api.github.com/repos/hnam2812/fels_81/subscribers","subscription_url":"https://api.github.com/repos/hnam2812/fels_81/subscription","commits_url":"https://api.github.com/repos/hnam2812/fels_81/commits{/sha}","git_commits_url":"https://api.github.com/repos/hnam2812/fels_81/git/commits{/sha}","comments_url":"https://api.github.com/repos/hnam2812/fels_81/comments{/number}","issue_comment_url":"https://api.github.com/repos/hnam2812/fels_81/issues/comments{/number}","contents_url":"https://api.github.com/repos/hnam2812/fels_81/contents/{+path}","compare_url":"https://api.github.com/repos/hnam2812/fels_81/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hnam2812/fels_81/merges","archive_url":"https://api.github.com/repos/hnam2812/fels_81/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hnam2812/fels_81/downloads","issues_url":"https://api.github.com/repos/hnam2812/fels_81/issues{/number}","pulls_url":"https://api.github.com/repos/hnam2812/fels_81/pulls{/number}","milestones_url":"https://api.github.com/repos/hnam2812/fels_81/milestones{/number}","notifications_url":"https://api.github.com/repos/hnam2812/fels_81/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hnam2812/fels_81/labels{/name}","releases_url":"https://api.github.com/repos/hnam2812/fels_81/releases{/id}","created_at":"2015-10-15T06:25:43Z","updated_at":"2015-10-14T10:02:02Z","pushed_at":"2015-10-29T02:46:12Z","git_url":"git://github.com/hnam2812/fels_81.git","ssh_url":"git@github.com:hnam2812/fels_81.git","clone_url":"https://github.com/hnam2812/fels_81.git","svn_url":"https://github.com/hnam2812/fels_81","homepage":null,"size":218,"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":"895740e4c907019e34d88bb3064ec14d4c8bcf30","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":44239448,"name":"fels_81","full_name":"framgia/fels_81","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_81","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_81","forks_url":"https://api.github.com/repos/framgia/fels_81/forks","keys_url":"https://api.github.com/repos/framgia/fels_81/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_81/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_81/teams","hooks_url":"https://api.github.com/repos/framgia/fels_81/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_81/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_81/events","assignees_url":"https://api.github.com/repos/framgia/fels_81/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_81/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_81/tags","blobs_url":"https://api.github.com/repos/framgia/fels_81/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_81/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_81/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_81/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_81/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_81/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_81/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_81/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_81/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_81/subscription","commits_url":"https://api.github.com/repos/framgia/fels_81/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_81/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_81/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_81/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_81/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_81/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_81/merges","archive_url":"https://api.github.com/repos/framgia/fels_81/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_81/downloads","issues_url":"https://api.github.com/repos/framgia/fels_81/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_81/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_81/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_81/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_81/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_81/releases{/id}","created_at":"2015-10-14T10:02:02Z","updated_at":"2015-10-14T10:02:02Z","pushed_at":"2015-10-29T02:46:12Z","git_url":"git://github.com/framgia/fels_81.git","ssh_url":"git@github.com:framgia/fels_81.git","clone_url":"https://github.com/framgia/fels_81.git","svn_url":"https://github.com/framgia/fels_81","homepage":null,"size":2035,"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":4,"forks":2,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_81/pulls/18"},"html":{"href":"https://github.com/framgia/fels_81/pull/18"},"issue":{"href":"https://api.github.com/repos/framgia/fels_81/issues/18"},"comments":{"href":"https://api.github.com/repos/framgia/fels_81/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_81/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_81/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_81/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_81/statuses/7319a575dad8c16bb2205ee84f7ba3b68b5984a9"}}}}