{"action":"created","comment":{"url":"https://api.github.com/repos/karmahrm/karmahrm/pulls/comments/77943770","id":77943770,"diff_hunk":"@@ -27,77 +27,76 @@\n #\n \n class Employee < ActiveRecord::Base\n-   # Associations\n-   belongs_to :user, dependent: :destroy\n-   belongs_to :department\n-   has_many :teams, through: :team_membership\n-   has_many :tasks\n-   belongs_to :referrer, class_name: 'Employee'\n-   belongs_to :manager, class_name: 'Employee'\n-   has_many :subordinates, class_name: 'Employee', foreign_key: 'manager_id'\n-   has_many :hooks, dependent: :destroy, class_name: 'EmployeeHook'\n-   validates :gender, inclusion: { in: %w(male female), allow_nil: true }\n-   validates :marital_status, inclusion: { in: %w(single married divorced widowed), allow_nil: true }\n-   # Delegates\n-   delegate :first_name, to: :user\n-   delegate :last_name, to: :user\n-   delegate :email, to: :user\n-   delegate :name, to: :user\n-   # callbacks\n-   before_save :create_user\n-   # validations\n-   validates :employee_id, uniqueness: true\n-   validates :employee_id, presence: true\n-   # nested attributes\n-   accepts_nested_attributes_for :user\n-   # scopes\n-   scope :active, -> { where(is_active: true) }\n-   scope :inactive, -> { where(is_active: false) }\n-   scope :birth_day, -> { where(date_of_birth: Time.zone.today) }\n-   # attr_accessor :country_id\n-   # custom\n-   scope :search_import, -> { includes(:user) }\n-   searchkick if KarmaHrm.search_kick_enabled?\n-   # Associations\n-   def create_user\n-      # do nothing\n-    end\n+  # Associations\n+  has_one :user, dependent: :destroy, as: :role\n+  belongs_to :department\n+  has_many :teams, through: :team_membership\n+  has_many :tasks\n+  belongs_to :referrer, class_name: 'Employee'","path":"app/models/employee.rb","position":44,"original_position":44,"commit_id":"e57e3ca4864a1e763f04ed769c6157831419d787","original_commit_id":"e57e3ca4864a1e763f04ed769c6157831419d787","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2016-09-08T04:17:06Z","updated_at":"2016-09-08T04:17:06Z","html_url":"https://github.com/karmahrm/karmahrm/pull/5#discussion_r77943770","pull_request_url":"https://api.github.com/repos/karmahrm/karmahrm/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/karmahrm/karmahrm/pulls/comments/77943770"},"html":{"href":"https://github.com/karmahrm/karmahrm/pull/5#discussion_r77943770"},"pull_request":{"href":"https://api.github.com/repos/karmahrm/karmahrm/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/karmahrm/karmahrm/pulls/5","id":84412051,"html_url":"https://github.com/karmahrm/karmahrm/pull/5","diff_url":"https://github.com/karmahrm/karmahrm/pull/5.diff","patch_url":"https://github.com/karmahrm/karmahrm/pull/5.patch","issue_url":"https://api.github.com/repos/karmahrm/karmahrm/issues/5","number":5,"state":"open","locked":false,"title":"Restructured asscociation to support multple type of users","user":{"login":"tachyons","id":3112976,"avatar_url":"https://avatars.githubusercontent.com/u/3112976?v=3","gravatar_id":"","url":"https://api.github.com/users/tachyons","html_url":"https://github.com/tachyons","followers_url":"https://api.github.com/users/tachyons/followers","following_url":"https://api.github.com/users/tachyons/following{/other_user}","gists_url":"https://api.github.com/users/tachyons/gists{/gist_id}","starred_url":"https://api.github.com/users/tachyons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tachyons/subscriptions","organizations_url":"https://api.github.com/users/tachyons/orgs","repos_url":"https://api.github.com/users/tachyons/repos","events_url":"https://api.github.com/users/tachyons/events{/privacy}","received_events_url":"https://api.github.com/users/tachyons/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-08T04:12:01Z","updated_at":"2016-09-08T04:17:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4d00c4efdbbf6ed7db0950f6e9dd52de8b80c85","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/karmahrm/karmahrm/pulls/5/commits","review_comments_url":"https://api.github.com/repos/karmahrm/karmahrm/pulls/5/comments","review_comment_url":"https://api.github.com/repos/karmahrm/karmahrm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/karmahrm/karmahrm/issues/5/comments","statuses_url":"https://api.github.com/repos/karmahrm/karmahrm/statuses/e57e3ca4864a1e763f04ed769c6157831419d787","head":{"label":"tachyons:user_associations","ref":"user_associations","sha":"e57e3ca4864a1e763f04ed769c6157831419d787","user":{"login":"tachyons","id":3112976,"avatar_url":"https://avatars.githubusercontent.com/u/3112976?v=3","gravatar_id":"","url":"https://api.github.com/users/tachyons","html_url":"https://github.com/tachyons","followers_url":"https://api.github.com/users/tachyons/followers","following_url":"https://api.github.com/users/tachyons/following{/other_user}","gists_url":"https://api.github.com/users/tachyons/gists{/gist_id}","starred_url":"https://api.github.com/users/tachyons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tachyons/subscriptions","organizations_url":"https://api.github.com/users/tachyons/orgs","repos_url":"https://api.github.com/users/tachyons/repos","events_url":"https://api.github.com/users/tachyons/events{/privacy}","received_events_url":"https://api.github.com/users/tachyons/received_events","type":"User","site_admin":false},"repo":{"id":57452715,"name":"karmahrm","full_name":"tachyons/karmahrm","owner":{"login":"tachyons","id":3112976,"avatar_url":"https://avatars.githubusercontent.com/u/3112976?v=3","gravatar_id":"","url":"https://api.github.com/users/tachyons","html_url":"https://github.com/tachyons","followers_url":"https://api.github.com/users/tachyons/followers","following_url":"https://api.github.com/users/tachyons/following{/other_user}","gists_url":"https://api.github.com/users/tachyons/gists{/gist_id}","starred_url":"https://api.github.com/users/tachyons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tachyons/subscriptions","organizations_url":"https://api.github.com/users/tachyons/orgs","repos_url":"https://api.github.com/users/tachyons/repos","events_url":"https://api.github.com/users/tachyons/events{/privacy}","received_events_url":"https://api.github.com/users/tachyons/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tachyons/karmahrm","description":"Human resource management system in rails","fork":true,"url":"https://api.github.com/repos/tachyons/karmahrm","forks_url":"https://api.github.com/repos/tachyons/karmahrm/forks","keys_url":"https://api.github.com/repos/tachyons/karmahrm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tachyons/karmahrm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tachyons/karmahrm/teams","hooks_url":"https://api.github.com/repos/tachyons/karmahrm/hooks","issue_events_url":"https://api.github.com/repos/tachyons/karmahrm/issues/events{/number}","events_url":"https://api.github.com/repos/tachyons/karmahrm/events","assignees_url":"https://api.github.com/repos/tachyons/karmahrm/assignees{/user}","branches_url":"https://api.github.com/repos/tachyons/karmahrm/branches{/branch}","tags_url":"https://api.github.com/repos/tachyons/karmahrm/tags","blobs_url":"https://api.github.com/repos/tachyons/karmahrm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tachyons/karmahrm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tachyons/karmahrm/git/refs{/sha}","trees_url":"https://api.github.com/repos/tachyons/karmahrm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tachyons/karmahrm/statuses/{sha}","languages_url":"https://api.github.com/repos/tachyons/karmahrm/languages","stargazers_url":"https://api.github.com/repos/tachyons/karmahrm/stargazers","contributors_url":"https://api.github.com/repos/tachyons/karmahrm/contributors","subscribers_url":"https://api.github.com/repos/tachyons/karmahrm/subscribers","subscription_url":"https://api.github.com/repos/tachyons/karmahrm/subscription","commits_url":"https://api.github.com/repos/tachyons/karmahrm/commits{/sha}","git_commits_url":"https://api.github.com/repos/tachyons/karmahrm/git/commits{/sha}","comments_url":"https://api.github.com/repos/tachyons/karmahrm/comments{/number}","issue_comment_url":"https://api.github.com/repos/tachyons/karmahrm/issues/comments{/number}","contents_url":"https://api.github.com/repos/tachyons/karmahrm/contents/{+path}","compare_url":"https://api.github.com/repos/tachyons/karmahrm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tachyons/karmahrm/merges","archive_url":"https://api.github.com/repos/tachyons/karmahrm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tachyons/karmahrm/downloads","issues_url":"https://api.github.com/repos/tachyons/karmahrm/issues{/number}","pulls_url":"https://api.github.com/repos/tachyons/karmahrm/pulls{/number}","milestones_url":"https://api.github.com/repos/tachyons/karmahrm/milestones{/number}","notifications_url":"https://api.github.com/repos/tachyons/karmahrm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tachyons/karmahrm/labels{/name}","releases_url":"https://api.github.com/repos/tachyons/karmahrm/releases{/id}","deployments_url":"https://api.github.com/repos/tachyons/karmahrm/deployments","created_at":"2016-04-30T16:57:16Z","updated_at":"2016-05-05T11:20:48Z","pushed_at":"2016-09-08T04:16:58Z","git_url":"git://github.com/tachyons/karmahrm.git","ssh_url":"git@github.com:tachyons/karmahrm.git","clone_url":"https://github.com/tachyons/karmahrm.git","svn_url":"https://github.com/tachyons/karmahrm","homepage":"http://simplehr.herokuapp.com/","size":232,"stargazers_count":1,"watchers_count":1,"language":"Ruby","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":1,"default_branch":"master"}},"base":{"label":"karmahrm:master","ref":"master","sha":"bf57c971441d15faf8d77a65afa41379b247807e","user":{"login":"karmahrm","id":17687876,"avatar_url":"https://avatars.githubusercontent.com/u/17687876?v=3","gravatar_id":"","url":"https://api.github.com/users/karmahrm","html_url":"https://github.com/karmahrm","followers_url":"https://api.github.com/users/karmahrm/followers","following_url":"https://api.github.com/users/karmahrm/following{/other_user}","gists_url":"https://api.github.com/users/karmahrm/gists{/gist_id}","starred_url":"https://api.github.com/users/karmahrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karmahrm/subscriptions","organizations_url":"https://api.github.com/users/karmahrm/orgs","repos_url":"https://api.github.com/users/karmahrm/repos","events_url":"https://api.github.com/users/karmahrm/events{/privacy}","received_events_url":"https://api.github.com/users/karmahrm/received_events","type":"Organization","site_admin":false},"repo":{"id":53261542,"name":"karmahrm","full_name":"karmahrm/karmahrm","owner":{"login":"karmahrm","id":17687876,"avatar_url":"https://avatars.githubusercontent.com/u/17687876?v=3","gravatar_id":"","url":"https://api.github.com/users/karmahrm","html_url":"https://github.com/karmahrm","followers_url":"https://api.github.com/users/karmahrm/followers","following_url":"https://api.github.com/users/karmahrm/following{/other_user}","gists_url":"https://api.github.com/users/karmahrm/gists{/gist_id}","starred_url":"https://api.github.com/users/karmahrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karmahrm/subscriptions","organizations_url":"https://api.github.com/users/karmahrm/orgs","repos_url":"https://api.github.com/users/karmahrm/repos","events_url":"https://api.github.com/users/karmahrm/events{/privacy}","received_events_url":"https://api.github.com/users/karmahrm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/karmahrm/karmahrm","description":"Human resource management system in rails (Early stage of development , not ready for production !)","fork":false,"url":"https://api.github.com/repos/karmahrm/karmahrm","forks_url":"https://api.github.com/repos/karmahrm/karmahrm/forks","keys_url":"https://api.github.com/repos/karmahrm/karmahrm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karmahrm/karmahrm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karmahrm/karmahrm/teams","hooks_url":"https://api.github.com/repos/karmahrm/karmahrm/hooks","issue_events_url":"https://api.github.com/repos/karmahrm/karmahrm/issues/events{/number}","events_url":"https://api.github.com/repos/karmahrm/karmahrm/events","assignees_url":"https://api.github.com/repos/karmahrm/karmahrm/assignees{/user}","branches_url":"https://api.github.com/repos/karmahrm/karmahrm/branches{/branch}","tags_url":"https://api.github.com/repos/karmahrm/karmahrm/tags","blobs_url":"https://api.github.com/repos/karmahrm/karmahrm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karmahrm/karmahrm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karmahrm/karmahrm/git/refs{/sha}","trees_url":"https://api.github.com/repos/karmahrm/karmahrm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karmahrm/karmahrm/statuses/{sha}","languages_url":"https://api.github.com/repos/karmahrm/karmahrm/languages","stargazers_url":"https://api.github.com/repos/karmahrm/karmahrm/stargazers","contributors_url":"https://api.github.com/repos/karmahrm/karmahrm/contributors","subscribers_url":"https://api.github.com/repos/karmahrm/karmahrm/subscribers","subscription_url":"https://api.github.com/repos/karmahrm/karmahrm/subscription","commits_url":"https://api.github.com/repos/karmahrm/karmahrm/commits{/sha}","git_commits_url":"https://api.github.com/repos/karmahrm/karmahrm/git/commits{/sha}","comments_url":"https://api.github.com/repos/karmahrm/karmahrm/comments{/number}","issue_comment_url":"https://api.github.com/repos/karmahrm/karmahrm/issues/comments{/number}","contents_url":"https://api.github.com/repos/karmahrm/karmahrm/contents/{+path}","compare_url":"https://api.github.com/repos/karmahrm/karmahrm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karmahrm/karmahrm/merges","archive_url":"https://api.github.com/repos/karmahrm/karmahrm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karmahrm/karmahrm/downloads","issues_url":"https://api.github.com/repos/karmahrm/karmahrm/issues{/number}","pulls_url":"https://api.github.com/repos/karmahrm/karmahrm/pulls{/number}","milestones_url":"https://api.github.com/repos/karmahrm/karmahrm/milestones{/number}","notifications_url":"https://api.github.com/repos/karmahrm/karmahrm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karmahrm/karmahrm/labels{/name}","releases_url":"https://api.github.com/repos/karmahrm/karmahrm/releases{/id}","deployments_url":"https://api.github.com/repos/karmahrm/karmahrm/deployments","created_at":"2016-03-06T15:25:56Z","updated_at":"2016-07-12T14:24:16Z","pushed_at":"2016-09-08T04:16:58Z","git_url":"git://github.com/karmahrm/karmahrm.git","ssh_url":"git@github.com:karmahrm/karmahrm.git","clone_url":"https://github.com/karmahrm/karmahrm.git","svn_url":"https://github.com/karmahrm/karmahrm","homepage":"http://karmahrm.herokuapp.com/","size":229,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/karmahrm/karmahrm/pulls/5"},"html":{"href":"https://github.com/karmahrm/karmahrm/pull/5"},"issue":{"href":"https://api.github.com/repos/karmahrm/karmahrm/issues/5"},"comments":{"href":"https://api.github.com/repos/karmahrm/karmahrm/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/karmahrm/karmahrm/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/karmahrm/karmahrm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/karmahrm/karmahrm/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/karmahrm/karmahrm/statuses/e57e3ca4864a1e763f04ed769c6157831419d787"}}}}
{"actor":{"display_login":"houndci-bot"}}