{"action":"created","comment":{"url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/comments/136362237","pull_request_review_id":59890374,"id":136362237,"diff_hunk":"@@ -1,19 +1,32 @@\n class TrainingSession < ActiveRecord::Base\n   belongs_to :training\n   belongs_to :user\n+\n   has_and_belongs_to_many :users, :uniq => true\n   has_many :certifications, dependent: :destroy\n+  has_one :space, through: :training\n \n   validates :training, presence: { message: \"A training subject is required\"}\n   validates :user, presence: { message: \"A trainer is required\"}\n   validate :is_staff\n+  validate :course_choice\n \n   def is_staff\n     errors.add(:string, \"user must be staff\") unless self.user.staff?\n   end\n \n+  def course_choice\n+    if self.course == 'no course'","path":"app/models/training_session.rb","position":null,"original_position":19,"commit_id":"59931d73d09aa9bf28df02664d3471e4b9546408","original_commit_id":"ab372195dc98c64a21477f47bfc2a2a436292be2","user":{"login":"KarimChukfeh","id":9063723,"avatar_url":"https://avatars2.githubusercontent.com/u/9063723?v=4","gravatar_id":"","url":"https://api.github.com/users/KarimChukfeh","html_url":"https://github.com/KarimChukfeh","followers_url":"https://api.github.com/users/KarimChukfeh/followers","following_url":"https://api.github.com/users/KarimChukfeh/following{/other_user}","gists_url":"https://api.github.com/users/KarimChukfeh/gists{/gist_id}","starred_url":"https://api.github.com/users/KarimChukfeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarimChukfeh/subscriptions","organizations_url":"https://api.github.com/users/KarimChukfeh/orgs","repos_url":"https://api.github.com/users/KarimChukfeh/repos","events_url":"https://api.github.com/users/KarimChukfeh/events{/privacy}","received_events_url":"https://api.github.com/users/KarimChukfeh/received_events","type":"User","site_admin":false},"body":"done","created_at":"2017-08-31T15:07:57Z","updated_at":"2017-08-31T15:07:57Z","html_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo/pull/105#discussion_r136362237","pull_request_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/105","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/comments/136362237"},"html":{"href":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo/pull/105#discussion_r136362237"},"pull_request":{"href":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/105"}},"in_reply_to_id":135660483},"pull_request":{"url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/105","id":136388497,"html_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo/pull/105","diff_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo/pull/105.diff","patch_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo/pull/105.patch","issue_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues/105","number":105,"state":"open","locked":false,"title":"Staff dashboard","user":{"login":"KarimChukfeh","id":9063723,"avatar_url":"https://avatars2.githubusercontent.com/u/9063723?v=4","gravatar_id":"","url":"https://api.github.com/users/KarimChukfeh","html_url":"https://github.com/KarimChukfeh","followers_url":"https://api.github.com/users/KarimChukfeh/followers","following_url":"https://api.github.com/users/KarimChukfeh/following{/other_user}","gists_url":"https://api.github.com/users/KarimChukfeh/gists{/gist_id}","starred_url":"https://api.github.com/users/KarimChukfeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarimChukfeh/subscriptions","organizations_url":"https://api.github.com/users/KarimChukfeh/orgs","repos_url":"https://api.github.com/users/KarimChukfeh/repos","events_url":"https://api.github.com/users/KarimChukfeh/events{/privacy}","received_events_url":"https://api.github.com/users/KarimChukfeh/received_events","type":"User","site_admin":false},"body":"Staff dashboard, or \"kiosk\", is where staff and admin can see who's in the space and easily add/remove users.\r\n\r\nThis PR includes a lot of view changes to make the user experience better. ","created_at":"2017-08-18T02:04:01Z","updated_at":"2017-08-31T15:07:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16aa1a46077c41d8f822a4ed6c6ec9f1b84ed047","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/105/commits","review_comments_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/105/comments","review_comment_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues/105/comments","statuses_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/statuses/59931d73d09aa9bf28df02664d3471e4b9546408","head":{"label":"uOttawa-Makerspace:staff_dashboard","ref":"staff_dashboard","sha":"59931d73d09aa9bf28df02664d3471e4b9546408","user":{"login":"uOttawa-Makerspace","id":17520717,"avatar_url":"https://avatars1.githubusercontent.com/u/17520717?v=4","gravatar_id":"","url":"https://api.github.com/users/uOttawa-Makerspace","html_url":"https://github.com/uOttawa-Makerspace","followers_url":"https://api.github.com/users/uOttawa-Makerspace/followers","following_url":"https://api.github.com/users/uOttawa-Makerspace/following{/other_user}","gists_url":"https://api.github.com/users/uOttawa-Makerspace/gists{/gist_id}","starred_url":"https://api.github.com/users/uOttawa-Makerspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uOttawa-Makerspace/subscriptions","organizations_url":"https://api.github.com/users/uOttawa-Makerspace/orgs","repos_url":"https://api.github.com/users/uOttawa-Makerspace/repos","events_url":"https://api.github.com/users/uOttawa-Makerspace/events{/privacy}","received_events_url":"https://api.github.com/users/uOttawa-Makerspace/received_events","type":"Organization","site_admin":false},"repo":{"id":36754511,"name":"MakerSpaceRepo","full_name":"uOttawa-Makerspace/MakerSpaceRepo","owner":{"login":"uOttawa-Makerspace","id":17520717,"avatar_url":"https://avatars1.githubusercontent.com/u/17520717?v=4","gravatar_id":"","url":"https://api.github.com/users/uOttawa-Makerspace","html_url":"https://github.com/uOttawa-Makerspace","followers_url":"https://api.github.com/users/uOttawa-Makerspace/followers","following_url":"https://api.github.com/users/uOttawa-Makerspace/following{/other_user}","gists_url":"https://api.github.com/users/uOttawa-Makerspace/gists{/gist_id}","starred_url":"https://api.github.com/users/uOttawa-Makerspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uOttawa-Makerspace/subscriptions","organizations_url":"https://api.github.com/users/uOttawa-Makerspace/orgs","repos_url":"https://api.github.com/users/uOttawa-Makerspace/repos","events_url":"https://api.github.com/users/uOttawa-Makerspace/events{/privacy}","received_events_url":"https://api.github.com/users/uOttawa-Makerspace/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo","description":null,"fork":false,"url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo","forks_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/forks","keys_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/teams","hooks_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/hooks","issue_events_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues/events{/number}","events_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/events","assignees_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/assignees{/user}","branches_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/branches{/branch}","tags_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/tags","blobs_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/refs{/sha}","trees_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/statuses/{sha}","languages_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/languages","stargazers_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/stargazers","contributors_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/contributors","subscribers_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/subscribers","subscription_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/subscription","commits_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/commits{/sha}","git_commits_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/commits{/sha}","comments_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/comments{/number}","issue_comment_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues/comments{/number}","contents_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/contents/{+path}","compare_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/merges","archive_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/downloads","issues_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues{/number}","pulls_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls{/number}","milestones_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/milestones{/number}","notifications_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/labels{/name}","releases_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/releases{/id}","deployments_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/deployments","created_at":"2015-06-02T18:51:17Z","updated_at":"2017-05-08T15:07:27Z","pushed_at":"2017-08-31T14:58:23Z","git_url":"git://github.com/uOttawa-Makerspace/MakerSpaceRepo.git","ssh_url":"git@github.com:uOttawa-Makerspace/MakerSpaceRepo.git","clone_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo.git","svn_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo","homepage":"http://makerepo.com/","size":59282,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"master"}},"base":{"label":"uOttawa-Makerspace:master","ref":"master","sha":"aecf29968e04d0fc114b54e648f8452846994131","user":{"login":"uOttawa-Makerspace","id":17520717,"avatar_url":"https://avatars1.githubusercontent.com/u/17520717?v=4","gravatar_id":"","url":"https://api.github.com/users/uOttawa-Makerspace","html_url":"https://github.com/uOttawa-Makerspace","followers_url":"https://api.github.com/users/uOttawa-Makerspace/followers","following_url":"https://api.github.com/users/uOttawa-Makerspace/following{/other_user}","gists_url":"https://api.github.com/users/uOttawa-Makerspace/gists{/gist_id}","starred_url":"https://api.github.com/users/uOttawa-Makerspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uOttawa-Makerspace/subscriptions","organizations_url":"https://api.github.com/users/uOttawa-Makerspace/orgs","repos_url":"https://api.github.com/users/uOttawa-Makerspace/repos","events_url":"https://api.github.com/users/uOttawa-Makerspace/events{/privacy}","received_events_url":"https://api.github.com/users/uOttawa-Makerspace/received_events","type":"Organization","site_admin":false},"repo":{"id":36754511,"name":"MakerSpaceRepo","full_name":"uOttawa-Makerspace/MakerSpaceRepo","owner":{"login":"uOttawa-Makerspace","id":17520717,"avatar_url":"https://avatars1.githubusercontent.com/u/17520717?v=4","gravatar_id":"","url":"https://api.github.com/users/uOttawa-Makerspace","html_url":"https://github.com/uOttawa-Makerspace","followers_url":"https://api.github.com/users/uOttawa-Makerspace/followers","following_url":"https://api.github.com/users/uOttawa-Makerspace/following{/other_user}","gists_url":"https://api.github.com/users/uOttawa-Makerspace/gists{/gist_id}","starred_url":"https://api.github.com/users/uOttawa-Makerspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uOttawa-Makerspace/subscriptions","organizations_url":"https://api.github.com/users/uOttawa-Makerspace/orgs","repos_url":"https://api.github.com/users/uOttawa-Makerspace/repos","events_url":"https://api.github.com/users/uOttawa-Makerspace/events{/privacy}","received_events_url":"https://api.github.com/users/uOttawa-Makerspace/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo","description":null,"fork":false,"url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo","forks_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/forks","keys_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/teams","hooks_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/hooks","issue_events_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues/events{/number}","events_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/events","assignees_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/assignees{/user}","branches_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/branches{/branch}","tags_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/tags","blobs_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/refs{/sha}","trees_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/statuses/{sha}","languages_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/languages","stargazers_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/stargazers","contributors_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/contributors","subscribers_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/subscribers","subscription_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/subscription","commits_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/commits{/sha}","git_commits_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/git/commits{/sha}","comments_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/comments{/number}","issue_comment_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues/comments{/number}","contents_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/contents/{+path}","compare_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/merges","archive_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/downloads","issues_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues{/number}","pulls_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls{/number}","milestones_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/milestones{/number}","notifications_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/labels{/name}","releases_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/releases{/id}","deployments_url":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/deployments","created_at":"2015-06-02T18:51:17Z","updated_at":"2017-05-08T15:07:27Z","pushed_at":"2017-08-31T14:58:23Z","git_url":"git://github.com/uOttawa-Makerspace/MakerSpaceRepo.git","ssh_url":"git@github.com:uOttawa-Makerspace/MakerSpaceRepo.git","clone_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo.git","svn_url":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo","homepage":"http://makerepo.com/","size":59282,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/105"},"html":{"href":"https://github.com/uOttawa-Makerspace/MakerSpaceRepo/pull/105"},"issue":{"href":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues/105"},"comments":{"href":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/issues/105/comments"},"review_comments":{"href":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/105/comments"},"review_comment":{"href":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/pulls/105/commits"},"statuses":{"href":"https://api.github.com/repos/uOttawa-Makerspace/MakerSpaceRepo/statuses/59931d73d09aa9bf28df02664d3471e4b9546408"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"KarimChukfeh"}}