{"action":"created","issue":{"url":"https://api.github.com/repos/CyberCraftInc/vacation_system/issues/14","labels_url":"https://api.github.com/repos/CyberCraftInc/vacation_system/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/CyberCraftInc/vacation_system/issues/14/comments","events_url":"https://api.github.com/repos/CyberCraftInc/vacation_system/issues/14/events","html_url":"https://github.com/CyberCraftInc/vacation_system/pull/14","id":107482211,"number":14,"title":"Update VacationRequest model validation","user":{"login":"eleidan","id":540832,"avatar_url":"https://avatars.githubusercontent.com/u/540832?v=3","gravatar_id":"","url":"https://api.github.com/users/eleidan","html_url":"https://github.com/eleidan","followers_url":"https://api.github.com/users/eleidan/followers","following_url":"https://api.github.com/users/eleidan/following{/other_user}","gists_url":"https://api.github.com/users/eleidan/gists{/gist_id}","starred_url":"https://api.github.com/users/eleidan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eleidan/subscriptions","organizations_url":"https://api.github.com/users/eleidan/orgs","repos_url":"https://api.github.com/users/eleidan/repos","events_url":"https://api.github.com/users/eleidan/events{/privacy}","received_events_url":"https://api.github.com/users/eleidan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-21T10:15:12Z","updated_at":"2015-09-22T12:16:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CyberCraftInc/vacation_system/pulls/14","html_url":"https://github.com/CyberCraftInc/vacation_system/pull/14","diff_url":"https://github.com/CyberCraftInc/vacation_system/pull/14.diff","patch_url":"https://github.com/CyberCraftInc/vacation_system/pull/14.patch"},"body":"The VacationRequest model implements validation method\r\n`cannot_intersect_with_other_vacations()` that looks into DB and checks\r\nif there are any records that intersect with the new record.\r\nThere must be no records that have days from the period of the new\r\nvacation request.\r\n\r\nUpdate factory for users so that it generates valid vacation requests\r\n\r\nUpdate factory for vacation requests so that it initialize `start_date`\r\nproperty dynamically, that is, with the `Time.zone.now()` method.\r\n\r\nUpdate tests for VacationRequest model\r\nTest `VacationRequest#cannot_intersect_with_other_vacations` method.\r\nRework test for validation of inclusion of `actual_end_date` property in\r\npermitted date range.\r\n\r\nUpdate BB VacationRequest model\r\nMove the `user_id` attribute from the list of defaults to the list\r\nof expected attributes.\r\n\r\nUpdate BB VacationRequestForm view\r\nAdd listener for the `error` event on VacationRequest model.\r\n\r\nUpdate copyright statement\r\n\r\n@alazarchuk , @rubycop , @epmlys "},"comment":{"url":"https://api.github.com/repos/CyberCraftInc/vacation_system/issues/comments/142271071","html_url":"https://github.com/CyberCraftInc/vacation_system/pull/14#issuecomment-142271071","issue_url":"https://api.github.com/repos/CyberCraftInc/vacation_system/issues/14","id":142271071,"user":{"login":"rubycop","id":9679385,"avatar_url":"https://avatars.githubusercontent.com/u/9679385?v=3","gravatar_id":"","url":"https://api.github.com/users/rubycop","html_url":"https://github.com/rubycop","followers_url":"https://api.github.com/users/rubycop/followers","following_url":"https://api.github.com/users/rubycop/following{/other_user}","gists_url":"https://api.github.com/users/rubycop/gists{/gist_id}","starred_url":"https://api.github.com/users/rubycop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubycop/subscriptions","organizations_url":"https://api.github.com/users/rubycop/orgs","repos_url":"https://api.github.com/users/rubycop/repos","events_url":"https://api.github.com/users/rubycop/events{/privacy}","received_events_url":"https://api.github.com/users/rubycop/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T12:16:27Z","updated_at":"2015-09-22T12:16:27Z","body":"LGFM.\r\n@alazarchuk you can merge this PR"}}