payload: {"action":"created","comment":{"url":"https://api.github.com/repos/substancelab/sharetribe/pulls/comments/282228855","pull_request_review_id":235266190,"id":282228855,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4MjIyODg1NQ==","diff_hunk":"@@ -0,0 +1,46 @@\n+# == Schema Information\n+#\n+# Table name: listing_working_date_slots\n+#\n+#  id         :integer          not null, primary key\n+#  listing_id :integer\n+#  date       :date\n+#  from       :string(255)\n+#  till       :string(255)\n+#  created_at :datetime         not null\n+#  updated_at :datetime         not null\n+#\n+# Indexes\n+#\n+#  index_listing_working_date_slots_on_listing_id  (listing_id)\n+#\n+\n+# This class keeps track of the hours open for a\n+# given listing on a specific date\n+class Listing::WorkingDateSlot < ApplicationRecord\n+  belongs_to :listing\n+\n+  validate :from_is_less_than_till\n+\n+  scope :by_date, ->(date) { where(date: date) }\n+  scope :ordered, -> { order('listing_working_date_slots.date ASC, listing_working_date_slots.from ASC') }\n+\n+  def covers_booking?(booking)\n+    from_time = Time.zone.parse(\"#{date} #{from}\")\n+    till_time = Time.zone.parse(\"#{date} #{till}\")\n+\n+    from_time <= booking.start_time && till_time >= booking.end_time\n+  end\n+\n+  private\n+\n+  def from_is_less_than_till\n+    now = Time.zone.now","path":"app/models/listing/working_date_slot.rb","position":38,"original_position":38,"commit_id":"b442e8440ae78c1ced70888fa52ae7e5d63457e1","original_commit_id":"b442e8440ae78c1ced70888fa52ae7e5d63457e1","user":{"login":"koppen","id":6480,"node_id":"MDQ6VXNlcjY0ODA=","avatar_url":"https://avatars0.githubusercontent.com/u/6480?v=4","gravatar_id":"","url":"https://api.github.com/users/koppen","html_url":"https://github.com/koppen","followers_url":"https://api.github.com/users/koppen/followers","following_url":"https://api.github.com/users/koppen/following{/other_user}","gists_url":"https://api.github.com/users/koppen/gists{/gist_id}","starred_url":"https://api.github.com/users/koppen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koppen/subscriptions","organizations_url":"https://api.github.com/users/koppen/orgs","repos_url":"https://api.github.com/users/koppen/repos","events_url":"https://api.github.com/users/koppen/events{/privacy}","received_events_url":"https://api.github.com/users/koppen/received_events","type":"User","site_admin":false},"body":"`now` bliver ikke længere brugt, så lad os droppe den.","created_at":"2019-05-08T20:09:16Z","updated_at":"2019-05-08T20:10:10Z","html_url":"https://github.com/substancelab/sharetribe/pull/6#discussion_r282228855","pull_request_url":"https://api.github.com/repos/substancelab/sharetribe/pulls/6","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/substancelab/sharetribe/pulls/comments/282228855"},"html":{"href":"https://github.com/substancelab/sharetribe/pull/6#discussion_r282228855"},"pull_request":{"href":"https://api.github.com/repos/substancelab/sharetribe/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/substancelab/sharetribe/pulls/6","id":276959851,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc2OTU5ODUx","html_url":"https://github.com/substancelab/sharetribe/pull/6","diff_url":"https://github.com/substancelab/sharetribe/pull/6.diff","patch_url":"https://github.com/substancelab/sharetribe/pull/6.patch","issue_url":"https://api.github.com/repos/substancelab/sharetribe/issues/6","number":6,"state":"open","locked":false,"title":"Add working date slot","user":{"login":"olepalm","id":5213037,"node_id":"MDQ6VXNlcjUyMTMwMzc=","avatar_url":"https://avatars2.githubusercontent.com/u/5213037?v=4","gravatar_id":"","url":"https://api.github.com/users/olepalm","html_url":"https://github.com/olepalm","followers_url":"https://api.github.com/users/olepalm/followers","following_url":"https://api.github.com/users/olepalm/following{/other_user}","gists_url":"https://api.github.com/users/olepalm/gists{/gist_id}","starred_url":"https://api.github.com/users/olepalm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olepalm/subscriptions","organizations_url":"https://api.github.com/users/olepalm/orgs","repos_url":"https://api.github.com/users/olepalm/repos","events_url":"https://api.github.com/users/olepalm/events{/privacy}","received_events_url":"https://api.github.com/users/olepalm/received_events","type":"User","site_admin":false},"body":"Adds WorkingDateSlot, which is basically identical to WorkingTimeSlot, except we can assign dates to the WorkingDateSlot.\r\n\r\nThis PR includes some much needed behaviour specs to WorkingTImeSlot.","created_at":"2019-05-08T11:27:20Z","updated_at":"2019-05-08T21:11:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee45032dd522164f88d87082c7eb85edae3b399c","assignee":{"login":"olepalm","id":5213037,"node_id":"MDQ6VXNlcjUyMTMwMzc=","avatar_url":"https://avatars2.githubusercontent.com/u/5213037?v=4","gravatar_id":"","url":"https://api.github.com/users/olepalm","html_url":"https://github.com/olepalm","followers_url":"https://api.github.com/users/olepalm/followers","following_url":"https://api.github.com/users/olepalm/following{/other_user}","gists_url":"https://api.github.com/users/olepalm/gists{/gist_id}","starred_url":"https://api.github.com/users/olepalm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olepalm/subscriptions","organizations_url":"https://api.github.com/users/olepalm/orgs","repos_url":"https://api.github.com/users/olepalm/repos","events_url":"https://api.github.com/users/olepalm/events{/privacy}","received_events_url":"https://api.github.com/users/olepalm/received_events","type":"User","site_admin":false},"assignees":[{"login":"olepalm","id":5213037,"node_id":"MDQ6VXNlcjUyMTMwMzc=","avatar_url":"https://avatars2.githubusercontent.com/u/5213037?v=4","gravatar_id":"","url":"https://api.github.com/users/olepalm","html_url":"https://github.com/olepalm","followers_url":"https://api.github.com/users/olepalm/followers","following_url":"https://api.github.com/users/olepalm/following{/other_user}","gists_url":"https://api.github.com/users/olepalm/gists{/gist_id}","starred_url":"https://api.github.com/users/olepalm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olepalm/subscriptions","organizations_url":"https://api.github.com/users/olepalm/orgs","repos_url":"https://api.github.com/users/olepalm/repos","events_url":"https://api.github.com/users/olepalm/events{/privacy}","received_events_url":"https://api.github.com/users/olepalm/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/substancelab/sharetribe/pulls/6/commits","review_comments_url":"https://api.github.com/repos/substancelab/sharetribe/pulls/6/comments","review_comment_url":"https://api.github.com/repos/substancelab/sharetribe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/substancelab/sharetribe/issues/6/comments","statuses_url":"https://api.github.com/repos/substancelab/sharetribe/statuses/b442e8440ae78c1ced70888fa52ae7e5d63457e1","head":{"label":"substancelab:add-working-date-slot","ref":"add-working-date-slot","sha":"b442e8440ae78c1ced70888fa52ae7e5d63457e1","user":{"login":"substancelab","id":2912227,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTIyMjc=","avatar_url":"https://avatars0.githubusercontent.com/u/2912227?v=4","gravatar_id":"","url":"https://api.github.com/users/substancelab","html_url":"https://github.com/substancelab","followers_url":"https://api.github.com/users/substancelab/followers","following_url":"https://api.github.com/users/substancelab/following{/other_user}","gists_url":"https://api.github.com/users/substancelab/gists{/gist_id}","starred_url":"https://api.github.com/users/substancelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/substancelab/subscriptions","organizations_url":"https://api.github.com/users/substancelab/orgs","repos_url":"https://api.github.com/users/substancelab/repos","events_url":"https://api.github.com/users/substancelab/events{/privacy}","received_events_url":"https://api.github.com/users/substancelab/received_events","type":"Organization","site_admin":false},"repo":{"id":178878690,"node_id":"MDEwOlJlcG9zaXRvcnkxNzg4Nzg2OTA=","name":"sharetribe","full_name":"substancelab/sharetribe","private":false,"owner":{"login":"substancelab","id":2912227,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTIyMjc=","avatar_url":"https://avatars0.githubusercontent.com/u/2912227?v=4","gravatar_id":"","url":"https://api.github.com/users/substancelab","html_url":"https://github.com/substancelab","followers_url":"https://api.github.com/users/substancelab/followers","following_url":"https://api.github.com/users/substancelab/following{/other_user}","gists_url":"https://api.github.com/users/substancelab/gists{/gist_id}","starred_url":"https://api.github.com/users/substancelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/substancelab/subscriptions","organizations_url":"https://api.github.com/users/substancelab/orgs","repos_url":"https://api.github.com/users/substancelab/repos","events_url":"https://api.github.com/users/substancelab/events{/privacy}","received_events_url":"https://api.github.com/users/substancelab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/substancelab/sharetribe","description":"Sharetribe Go is an open source marketplace platform, also available with SaaS model. See also Sharetribe Flex, a headless marketplace solution. https://www.sharetribe.com ","fork":true,"url":"https://api.github.com/repos/substancelab/sharetribe","forks_url":"https://api.github.com/repos/substancelab/sharetribe/forks","keys_url":"https://api.github.com/repos/substancelab/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/substancelab/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/substancelab/sharetribe/teams","hooks_url":"https://api.github.com/repos/substancelab/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/substancelab/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/substancelab/sharetribe/events","assignees_url":"https://api.github.com/repos/substancelab/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/substancelab/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/substancelab/sharetribe/tags","blobs_url":"https://api.github.com/repos/substancelab/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/substancelab/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/substancelab/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/substancelab/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/substancelab/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/substancelab/sharetribe/languages","stargazers_url":"https://api.github.com/repos/substancelab/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/substancelab/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/substancelab/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/substancelab/sharetribe/subscription","commits_url":"https://api.github.com/repos/substancelab/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/substancelab/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/substancelab/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/substancelab/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/substancelab/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/substancelab/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/substancelab/sharetribe/merges","archive_url":"https://api.github.com/repos/substancelab/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/substancelab/sharetribe/downloads","issues_url":"https://api.github.com/repos/substancelab/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/substancelab/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/substancelab/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/substancelab/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/substancelab/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/substancelab/sharetribe/releases{/id}","deployments_url":"https://api.github.com/repos/substancelab/sharetribe/deployments","created_at":"2019-04-01T14:16:00Z","updated_at":"2019-05-07T12:45:22Z","pushed_at":"2019-05-08T14:08:54Z","git_url":"git://github.com/substancelab/sharetribe.git","ssh_url":"git@github.com:substancelab/sharetribe.git","clone_url":"https://github.com/substancelab/sharetribe.git","svn_url":"https://github.com/substancelab/sharetribe","homepage":"https://www.sharetribe.com/flex/","size":120385,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"substancelab:master","ref":"master","sha":"b29e3d66fe730b8a329107783c57e147a55a9e63","user":{"login":"substancelab","id":2912227,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTIyMjc=","avatar_url":"https://avatars0.githubusercontent.com/u/2912227?v=4","gravatar_id":"","url":"https://api.github.com/users/substancelab","html_url":"https://github.com/substancelab","followers_url":"https://api.github.com/users/substancelab/followers","following_url":"https://api.github.com/users/substancelab/following{/other_user}","gists_url":"https://api.github.com/users/substancelab/gists{/gist_id}","starred_url":"https://api.github.com/users/substancelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/substancelab/subscriptions","organizations_url":"https://api.github.com/users/substancelab/orgs","repos_url":"https://api.github.com/users/substancelab/repos","events_url":"https://api.github.com/users/substancelab/events{/privacy}","received_events_url":"https://api.github.com/users/substancelab/received_events","type":"Organization","site_admin":false},"repo":{"id":178878690,"node_id":"MDEwOlJlcG9zaXRvcnkxNzg4Nzg2OTA=","name":"sharetribe","full_name":"substancelab/sharetribe","private":false,"owner":{"login":"substancelab","id":2912227,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTIyMjc=","avatar_url":"https://avatars0.githubusercontent.com/u/2912227?v=4","gravatar_id":"","url":"https://api.github.com/users/substancelab","html_url":"https://github.com/substancelab","followers_url":"https://api.github.com/users/substancelab/followers","following_url":"https://api.github.com/users/substancelab/following{/other_user}","gists_url":"https://api.github.com/users/substancelab/gists{/gist_id}","starred_url":"https://api.github.com/users/substancelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/substancelab/subscriptions","organizations_url":"https://api.github.com/users/substancelab/orgs","repos_url":"https://api.github.com/users/substancelab/repos","events_url":"https://api.github.com/users/substancelab/events{/privacy}","received_events_url":"https://api.github.com/users/substancelab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/substancelab/sharetribe","description":"Sharetribe Go is an open source marketplace platform, also available with SaaS model. See also Sharetribe Flex, a headless marketplace solution. https://www.sharetribe.com ","fork":true,"url":"https://api.github.com/repos/substancelab/sharetribe","forks_url":"https://api.github.com/repos/substancelab/sharetribe/forks","keys_url":"https://api.github.com/repos/substancelab/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/substancelab/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/substancelab/sharetribe/teams","hooks_url":"https://api.github.com/repos/substancelab/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/substancelab/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/substancelab/sharetribe/events","assignees_url":"https://api.github.com/repos/substancelab/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/substancelab/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/substancelab/sharetribe/tags","blobs_url":"https://api.github.com/repos/substancelab/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/substancelab/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/substancelab/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/substancelab/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/substancelab/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/substancelab/sharetribe/languages","stargazers_url":"https://api.github.com/repos/substancelab/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/substancelab/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/substancelab/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/substancelab/sharetribe/subscription","commits_url":"https://api.github.com/repos/substancelab/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/substancelab/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/substancelab/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/substancelab/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/substancelab/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/substancelab/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/substancelab/sharetribe/merges","archive_url":"https://api.github.com/repos/substancelab/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/substancelab/sharetribe/downloads","issues_url":"https://api.github.com/repos/substancelab/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/substancelab/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/substancelab/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/substancelab/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/substancelab/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/substancelab/sharetribe/releases{/id}","deployments_url":"https://api.github.com/repos/substancelab/sharetribe/deployments","created_at":"2019-04-01T14:16:00Z","updated_at":"2019-05-07T12:45:22Z","pushed_at":"2019-05-08T14:08:54Z","git_url":"git://github.com/substancelab/sharetribe.git","ssh_url":"git@github.com:substancelab/sharetribe.git","clone_url":"https://github.com/substancelab/sharetribe.git","svn_url":"https://github.com/substancelab/sharetribe","homepage":"https://www.sharetribe.com/flex/","size":120385,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/substancelab/sharetribe/pulls/6"},"html":{"href":"https://github.com/substancelab/sharetribe/pull/6"},"issue":{"href":"https://api.github.com/repos/substancelab/sharetribe/issues/6"},"comments":{"href":"https://api.github.com/repos/substancelab/sharetribe/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/substancelab/sharetribe/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/substancelab/sharetribe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/substancelab/sharetribe/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/substancelab/sharetribe/statuses/b442e8440ae78c1ced70888fa52ae7e5d63457e1"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"koppen"}}