{"action":"created","comment":{"url":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/comments/83236064","pull_request_review_id":4092166,"id":83236064,"diff_hunk":"@@ -1,7 +1,52 @@\n class Rider < ActiveRecord::Base\n+\n+  RIDER_CREATE = \", a rider, has been added to the group\"\n+  RIDER_EDIT = \", a rider, profile has been changed\"\n+  RIDER_DESTROY = \", a rider, has been removed from the group.\"\n+\n   has_many :engagement_rider\n   has_many :engagements, through: :engagement_rider\n \n   has_many :rider_equipments\n   has_many :equipment, through: :rider_equipments\n+\n+  def self.create_with_notification(current_user, params)\n+    rider = Rider.create(params)\n+    rider.notify(current_user,\n+                 rider.nickname + RIDER_CREATE,\n+                 2)\n+    return rider\n+  end\n+\n+  def update_with_notification(current_user, params)\n+    old_rider = self.attributes\n+    if self.update(params)\n+      if old_rider[\"nickname\"] == self.nickname\n+        msg = self.nickname + RIDER_EDIT\n+      else\n+        msg = self.nickname + RIDER_EDIT + \" (formerly #{old_rider[\"nickname\"]}).\"","path":"app/models/rider.rb","position":27,"original_position":27,"commit_id":"fd14c7d00a0ad96544777c9006aa1f7b41d81217","original_commit_id":"fd14c7d00a0ad96544777c9006aa1f7b41d81217","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":"Redundant self detected.<br>Prefer single-quoted strings inside interpolations.<br>Line is too long. [82/80]","created_at":"2016-10-13T14:58:15Z","updated_at":"2016-10-13T14:58:15Z","html_url":"https://github.com/lunarcollective/employee-scheduling/pull/40#discussion_r83236064","pull_request_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/comments/83236064"},"html":{"href":"https://github.com/lunarcollective/employee-scheduling/pull/40#discussion_r83236064"},"pull_request":{"href":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/40","id":89219556,"html_url":"https://github.com/lunarcollective/employee-scheduling/pull/40","diff_url":"https://github.com/lunarcollective/employee-scheduling/pull/40.diff","patch_url":"https://github.com/lunarcollective/employee-scheduling/pull/40.patch","issue_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues/40","number":40,"state":"open","locked":false,"title":"Equipment sorted by type","user":{"login":"DaneCarmichael","id":16695830,"avatar_url":"https://avatars.githubusercontent.com/u/16695830?v=3","gravatar_id":"","url":"https://api.github.com/users/DaneCarmichael","html_url":"https://github.com/DaneCarmichael","followers_url":"https://api.github.com/users/DaneCarmichael/followers","following_url":"https://api.github.com/users/DaneCarmichael/following{/other_user}","gists_url":"https://api.github.com/users/DaneCarmichael/gists{/gist_id}","starred_url":"https://api.github.com/users/DaneCarmichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaneCarmichael/subscriptions","organizations_url":"https://api.github.com/users/DaneCarmichael/orgs","repos_url":"https://api.github.com/users/DaneCarmichael/repos","events_url":"https://api.github.com/users/DaneCarmichael/events{/privacy}","received_events_url":"https://api.github.com/users/DaneCarmichael/received_events","type":"User","site_admin":false},"body":"When assigning equipment to a rider or horse, only equipment for a rider or horse is available. Added a string to equipment to designate what category it is for (rider, session, horse). Simplified the seed data so that there is only one of each piece.","created_at":"2016-10-13T14:58:00Z","updated_at":"2016-10-13T14:58:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/40/commits","review_comments_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/40/comments","review_comment_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues/40/comments","statuses_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/statuses/fd14c7d00a0ad96544777c9006aa1f7b41d81217","head":{"label":"lunarcollective:equipment-sorted-by-type","ref":"equipment-sorted-by-type","sha":"fd14c7d00a0ad96544777c9006aa1f7b41d81217","user":{"login":"lunarcollective","id":17710679,"avatar_url":"https://avatars.githubusercontent.com/u/17710679?v=3","gravatar_id":"","url":"https://api.github.com/users/lunarcollective","html_url":"https://github.com/lunarcollective","followers_url":"https://api.github.com/users/lunarcollective/followers","following_url":"https://api.github.com/users/lunarcollective/following{/other_user}","gists_url":"https://api.github.com/users/lunarcollective/gists{/gist_id}","starred_url":"https://api.github.com/users/lunarcollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunarcollective/subscriptions","organizations_url":"https://api.github.com/users/lunarcollective/orgs","repos_url":"https://api.github.com/users/lunarcollective/repos","events_url":"https://api.github.com/users/lunarcollective/events{/privacy}","received_events_url":"https://api.github.com/users/lunarcollective/received_events","type":"Organization","site_admin":false},"repo":{"id":61505109,"name":"employee-scheduling","full_name":"lunarcollective/employee-scheduling","owner":{"login":"lunarcollective","id":17710679,"avatar_url":"https://avatars.githubusercontent.com/u/17710679?v=3","gravatar_id":"","url":"https://api.github.com/users/lunarcollective","html_url":"https://github.com/lunarcollective","followers_url":"https://api.github.com/users/lunarcollective/followers","following_url":"https://api.github.com/users/lunarcollective/following{/other_user}","gists_url":"https://api.github.com/users/lunarcollective/gists{/gist_id}","starred_url":"https://api.github.com/users/lunarcollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunarcollective/subscriptions","organizations_url":"https://api.github.com/users/lunarcollective/orgs","repos_url":"https://api.github.com/users/lunarcollective/repos","events_url":"https://api.github.com/users/lunarcollective/events{/privacy}","received_events_url":"https://api.github.com/users/lunarcollective/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lunarcollective/employee-scheduling","description":null,"fork":false,"url":"https://api.github.com/repos/lunarcollective/employee-scheduling","forks_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/forks","keys_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/teams","hooks_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/hooks","issue_events_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues/events{/number}","events_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/events","assignees_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/assignees{/user}","branches_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/branches{/branch}","tags_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/tags","blobs_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/refs{/sha}","trees_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/statuses/{sha}","languages_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/languages","stargazers_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/stargazers","contributors_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/contributors","subscribers_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/subscribers","subscription_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/subscription","commits_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/commits{/sha}","git_commits_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/commits{/sha}","comments_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/comments{/number}","issue_comment_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues/comments{/number}","contents_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/contents/{+path}","compare_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/merges","archive_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/downloads","issues_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues{/number}","pulls_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls{/number}","milestones_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/milestones{/number}","notifications_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/labels{/name}","releases_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/releases{/id}","deployments_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/deployments","created_at":"2016-06-19T23:29:22Z","updated_at":"2016-10-12T06:11:11Z","pushed_at":"2016-10-13T14:58:00Z","git_url":"git://github.com/lunarcollective/employee-scheduling.git","ssh_url":"git@github.com:lunarcollective/employee-scheduling.git","clone_url":"https://github.com/lunarcollective/employee-scheduling.git","svn_url":"https://github.com/lunarcollective/employee-scheduling","homepage":null,"size":1720,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":4,"default_branch":"master"}},"base":{"label":"lunarcollective:master","ref":"master","sha":"fea11791134d625ea658593f4e129afd708615e3","user":{"login":"lunarcollective","id":17710679,"avatar_url":"https://avatars.githubusercontent.com/u/17710679?v=3","gravatar_id":"","url":"https://api.github.com/users/lunarcollective","html_url":"https://github.com/lunarcollective","followers_url":"https://api.github.com/users/lunarcollective/followers","following_url":"https://api.github.com/users/lunarcollective/following{/other_user}","gists_url":"https://api.github.com/users/lunarcollective/gists{/gist_id}","starred_url":"https://api.github.com/users/lunarcollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunarcollective/subscriptions","organizations_url":"https://api.github.com/users/lunarcollective/orgs","repos_url":"https://api.github.com/users/lunarcollective/repos","events_url":"https://api.github.com/users/lunarcollective/events{/privacy}","received_events_url":"https://api.github.com/users/lunarcollective/received_events","type":"Organization","site_admin":false},"repo":{"id":61505109,"name":"employee-scheduling","full_name":"lunarcollective/employee-scheduling","owner":{"login":"lunarcollective","id":17710679,"avatar_url":"https://avatars.githubusercontent.com/u/17710679?v=3","gravatar_id":"","url":"https://api.github.com/users/lunarcollective","html_url":"https://github.com/lunarcollective","followers_url":"https://api.github.com/users/lunarcollective/followers","following_url":"https://api.github.com/users/lunarcollective/following{/other_user}","gists_url":"https://api.github.com/users/lunarcollective/gists{/gist_id}","starred_url":"https://api.github.com/users/lunarcollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunarcollective/subscriptions","organizations_url":"https://api.github.com/users/lunarcollective/orgs","repos_url":"https://api.github.com/users/lunarcollective/repos","events_url":"https://api.github.com/users/lunarcollective/events{/privacy}","received_events_url":"https://api.github.com/users/lunarcollective/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lunarcollective/employee-scheduling","description":null,"fork":false,"url":"https://api.github.com/repos/lunarcollective/employee-scheduling","forks_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/forks","keys_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/teams","hooks_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/hooks","issue_events_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues/events{/number}","events_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/events","assignees_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/assignees{/user}","branches_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/branches{/branch}","tags_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/tags","blobs_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/refs{/sha}","trees_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/statuses/{sha}","languages_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/languages","stargazers_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/stargazers","contributors_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/contributors","subscribers_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/subscribers","subscription_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/subscription","commits_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/commits{/sha}","git_commits_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/git/commits{/sha}","comments_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/comments{/number}","issue_comment_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues/comments{/number}","contents_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/contents/{+path}","compare_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/merges","archive_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/downloads","issues_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues{/number}","pulls_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls{/number}","milestones_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/milestones{/number}","notifications_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/labels{/name}","releases_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/releases{/id}","deployments_url":"https://api.github.com/repos/lunarcollective/employee-scheduling/deployments","created_at":"2016-06-19T23:29:22Z","updated_at":"2016-10-12T06:11:11Z","pushed_at":"2016-10-13T14:58:00Z","git_url":"git://github.com/lunarcollective/employee-scheduling.git","ssh_url":"git@github.com:lunarcollective/employee-scheduling.git","clone_url":"https://github.com/lunarcollective/employee-scheduling.git","svn_url":"https://github.com/lunarcollective/employee-scheduling","homepage":null,"size":1720,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/40"},"html":{"href":"https://github.com/lunarcollective/employee-scheduling/pull/40"},"issue":{"href":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues/40"},"comments":{"href":"https://api.github.com/repos/lunarcollective/employee-scheduling/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lunarcollective/employee-scheduling/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/lunarcollective/employee-scheduling/statuses/fd14c7d00a0ad96544777c9006aa1f7b41d81217"}}}}
{"actor":{"display_login":"houndci-bot"}}