{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/wsm_02/pulls/comments/92307175","pull_request_review_id":12819786,"id":92307175,"diff_hunk":"@@ -32,9 +33,10 @@ def initialize *args\n   mount_uploader :avatar, AvatarUploader\n \n   validates :name, presence: true, length: {maximum: Settings.user.name}\n-  validates :employee_code, presence: true,\n-    uniqueness: {case_sensitive: false}, if: :validate_employee_code\n-  scope :order_date_desc, ->{order created_at: :desc}\n+  validates_uniqueness_of :employee_code, scope: :company_id,\n+    if: :validate_employee_code\n+  scope :recent, ->{order created_at: :desc}\n+  scope :load_by_company, ->company_id {where company_id: company_id}\n \n   def is_user? user","path":"app/models/user.rb","position":17,"original_position":17,"commit_id":"80152fe9c9eeb8e799787593b9ade596400e79e4","original_commit_id":"80152fe9c9eeb8e799787593b9ade596400e79e4","user":{"login":"framgia-jenkins-ci","id":16641396,"avatar_url":"https://avatars.githubusercontent.com/u/16641396?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia-jenkins-ci","html_url":"https://github.com/framgia-jenkins-ci","followers_url":"https://api.github.com/users/framgia-jenkins-ci/followers","following_url":"https://api.github.com/users/framgia-jenkins-ci/following{/other_user}","gists_url":"https://api.github.com/users/framgia-jenkins-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia-jenkins-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia-jenkins-ci/subscriptions","organizations_url":"https://api.github.com/users/framgia-jenkins-ci/orgs","repos_url":"https://api.github.com/users/framgia-jenkins-ci/repos","events_url":"https://api.github.com/users/framgia-jenkins-ci/events{/privacy}","received_events_url":"https://api.github.com/users/framgia-jenkins-ci/received_events","type":"User","site_admin":false},"body":"**Reporter**: CHECKSTYLE\n**Rule**: com.puppycrawl.tools.checkstyle.Style/MethodDefParentheses\n**Severity**: INFO\n**File**: app/models/user.rb L41\n\nUse def with parentheses when there are parameters.\n\n*<this is a auto generated comment from violation-comments-lib F7F8ASD8123FSDF>*\n","created_at":"2016-12-14T01:38:35Z","updated_at":"2016-12-14T01:38:35Z","html_url":"https://github.com/framgia/wsm_02/pull/22#discussion_r92307175","pull_request_url":"https://api.github.com/repos/framgia/wsm_02/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/framgia/wsm_02/pulls/comments/92307175"},"html":{"href":"https://github.com/framgia/wsm_02/pull/22#discussion_r92307175"},"pull_request":{"href":"https://api.github.com/repos/framgia/wsm_02/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/wsm_02/pulls/22","id":97705056,"html_url":"https://github.com/framgia/wsm_02/pull/22","diff_url":"https://github.com/framgia/wsm_02/pull/22.diff","patch_url":"https://github.com/framgia/wsm_02/pull/22.patch","issue_url":"https://api.github.com/repos/framgia/wsm_02/issues/22","number":22,"state":"open","locked":false,"title":"Management user","user":{"login":"tjn0994","id":16161667,"avatar_url":"https://avatars.githubusercontent.com/u/16161667?v=3","gravatar_id":"","url":"https://api.github.com/users/tjn0994","html_url":"https://github.com/tjn0994","followers_url":"https://api.github.com/users/tjn0994/followers","following_url":"https://api.github.com/users/tjn0994/following{/other_user}","gists_url":"https://api.github.com/users/tjn0994/gists{/gist_id}","starred_url":"https://api.github.com/users/tjn0994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjn0994/subscriptions","organizations_url":"https://api.github.com/users/tjn0994/orgs","repos_url":"https://api.github.com/users/tjn0994/repos","events_url":"https://api.github.com/users/tjn0994/events{/privacy}","received_events_url":"https://api.github.com/users/tjn0994/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-13T08:25:27Z","updated_at":"2016-12-14T01:38:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c36a42fb9a587b577a05485937d313f05e1e7f5d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/wsm_02/pulls/22/commits","review_comments_url":"https://api.github.com/repos/framgia/wsm_02/pulls/22/comments","review_comment_url":"https://api.github.com/repos/framgia/wsm_02/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/wsm_02/issues/22/comments","statuses_url":"https://api.github.com/repos/framgia/wsm_02/statuses/80152fe9c9eeb8e799787593b9ade596400e79e4","head":{"label":"tjn0994:dashboard/user","ref":"dashboard/user","sha":"80152fe9c9eeb8e799787593b9ade596400e79e4","user":{"login":"tjn0994","id":16161667,"avatar_url":"https://avatars.githubusercontent.com/u/16161667?v=3","gravatar_id":"","url":"https://api.github.com/users/tjn0994","html_url":"https://github.com/tjn0994","followers_url":"https://api.github.com/users/tjn0994/followers","following_url":"https://api.github.com/users/tjn0994/following{/other_user}","gists_url":"https://api.github.com/users/tjn0994/gists{/gist_id}","starred_url":"https://api.github.com/users/tjn0994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjn0994/subscriptions","organizations_url":"https://api.github.com/users/tjn0994/orgs","repos_url":"https://api.github.com/users/tjn0994/repos","events_url":"https://api.github.com/users/tjn0994/events{/privacy}","received_events_url":"https://api.github.com/users/tjn0994/received_events","type":"User","site_admin":false},"repo":{"id":74433965,"name":"wsm_02","full_name":"tjn0994/wsm_02","owner":{"login":"tjn0994","id":16161667,"avatar_url":"https://avatars.githubusercontent.com/u/16161667?v=3","gravatar_id":"","url":"https://api.github.com/users/tjn0994","html_url":"https://github.com/tjn0994","followers_url":"https://api.github.com/users/tjn0994/followers","following_url":"https://api.github.com/users/tjn0994/following{/other_user}","gists_url":"https://api.github.com/users/tjn0994/gists{/gist_id}","starred_url":"https://api.github.com/users/tjn0994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjn0994/subscriptions","organizations_url":"https://api.github.com/users/tjn0994/orgs","repos_url":"https://api.github.com/users/tjn0994/repos","events_url":"https://api.github.com/users/tjn0994/events{/privacy}","received_events_url":"https://api.github.com/users/tjn0994/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tjn0994/wsm_02","description":null,"fork":true,"url":"https://api.github.com/repos/tjn0994/wsm_02","forks_url":"https://api.github.com/repos/tjn0994/wsm_02/forks","keys_url":"https://api.github.com/repos/tjn0994/wsm_02/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tjn0994/wsm_02/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tjn0994/wsm_02/teams","hooks_url":"https://api.github.com/repos/tjn0994/wsm_02/hooks","issue_events_url":"https://api.github.com/repos/tjn0994/wsm_02/issues/events{/number}","events_url":"https://api.github.com/repos/tjn0994/wsm_02/events","assignees_url":"https://api.github.com/repos/tjn0994/wsm_02/assignees{/user}","branches_url":"https://api.github.com/repos/tjn0994/wsm_02/branches{/branch}","tags_url":"https://api.github.com/repos/tjn0994/wsm_02/tags","blobs_url":"https://api.github.com/repos/tjn0994/wsm_02/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tjn0994/wsm_02/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tjn0994/wsm_02/git/refs{/sha}","trees_url":"https://api.github.com/repos/tjn0994/wsm_02/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tjn0994/wsm_02/statuses/{sha}","languages_url":"https://api.github.com/repos/tjn0994/wsm_02/languages","stargazers_url":"https://api.github.com/repos/tjn0994/wsm_02/stargazers","contributors_url":"https://api.github.com/repos/tjn0994/wsm_02/contributors","subscribers_url":"https://api.github.com/repos/tjn0994/wsm_02/subscribers","subscription_url":"https://api.github.com/repos/tjn0994/wsm_02/subscription","commits_url":"https://api.github.com/repos/tjn0994/wsm_02/commits{/sha}","git_commits_url":"https://api.github.com/repos/tjn0994/wsm_02/git/commits{/sha}","comments_url":"https://api.github.com/repos/tjn0994/wsm_02/comments{/number}","issue_comment_url":"https://api.github.com/repos/tjn0994/wsm_02/issues/comments{/number}","contents_url":"https://api.github.com/repos/tjn0994/wsm_02/contents/{+path}","compare_url":"https://api.github.com/repos/tjn0994/wsm_02/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tjn0994/wsm_02/merges","archive_url":"https://api.github.com/repos/tjn0994/wsm_02/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tjn0994/wsm_02/downloads","issues_url":"https://api.github.com/repos/tjn0994/wsm_02/issues{/number}","pulls_url":"https://api.github.com/repos/tjn0994/wsm_02/pulls{/number}","milestones_url":"https://api.github.com/repos/tjn0994/wsm_02/milestones{/number}","notifications_url":"https://api.github.com/repos/tjn0994/wsm_02/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tjn0994/wsm_02/labels{/name}","releases_url":"https://api.github.com/repos/tjn0994/wsm_02/releases{/id}","deployments_url":"https://api.github.com/repos/tjn0994/wsm_02/deployments","created_at":"2016-11-22T04:22:53Z","updated_at":"2016-11-22T03:40:58Z","pushed_at":"2016-12-14T01:31:22Z","git_url":"git://github.com/tjn0994/wsm_02.git","ssh_url":"git@github.com:tjn0994/wsm_02.git","clone_url":"https://github.com/tjn0994/wsm_02.git","svn_url":"https://github.com/tjn0994/wsm_02","homepage":null,"size":1794,"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":"c8cc63bd96f843a3075abc9682949573409a3d6b","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":74431382,"name":"wsm_02","full_name":"framgia/wsm_02","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/wsm_02","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/wsm_02","forks_url":"https://api.github.com/repos/framgia/wsm_02/forks","keys_url":"https://api.github.com/repos/framgia/wsm_02/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/wsm_02/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/wsm_02/teams","hooks_url":"https://api.github.com/repos/framgia/wsm_02/hooks","issue_events_url":"https://api.github.com/repos/framgia/wsm_02/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/wsm_02/events","assignees_url":"https://api.github.com/repos/framgia/wsm_02/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/wsm_02/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/wsm_02/tags","blobs_url":"https://api.github.com/repos/framgia/wsm_02/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/wsm_02/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/wsm_02/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/wsm_02/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/wsm_02/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/wsm_02/languages","stargazers_url":"https://api.github.com/repos/framgia/wsm_02/stargazers","contributors_url":"https://api.github.com/repos/framgia/wsm_02/contributors","subscribers_url":"https://api.github.com/repos/framgia/wsm_02/subscribers","subscription_url":"https://api.github.com/repos/framgia/wsm_02/subscription","commits_url":"https://api.github.com/repos/framgia/wsm_02/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/wsm_02/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/wsm_02/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/wsm_02/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/wsm_02/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/wsm_02/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/wsm_02/merges","archive_url":"https://api.github.com/repos/framgia/wsm_02/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/wsm_02/downloads","issues_url":"https://api.github.com/repos/framgia/wsm_02/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/wsm_02/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/wsm_02/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/wsm_02/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/wsm_02/labels{/name}","releases_url":"https://api.github.com/repos/framgia/wsm_02/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/wsm_02/deployments","created_at":"2016-11-22T03:40:58Z","updated_at":"2016-12-08T06:11:06Z","pushed_at":"2016-12-14T01:31:22Z","git_url":"git://github.com/framgia/wsm_02.git","ssh_url":"git@github.com:framgia/wsm_02.git","clone_url":"https://github.com/framgia/wsm_02.git","svn_url":"https://github.com/framgia/wsm_02","homepage":null,"size":1800,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":3,"forks":11,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/wsm_02/pulls/22"},"html":{"href":"https://github.com/framgia/wsm_02/pull/22"},"issue":{"href":"https://api.github.com/repos/framgia/wsm_02/issues/22"},"comments":{"href":"https://api.github.com/repos/framgia/wsm_02/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/wsm_02/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/wsm_02/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/wsm_02/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/wsm_02/statuses/80152fe9c9eeb8e799787593b9ade596400e79e4"}}}}
{"actor":{"display_login":"framgia-jenkins-ci"}}