{"action":"closed","number":12,"pull_request":{"url":"https://api.github.com/repos/wolox-training/mlc-rails/pulls/12","id":227980996,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3OTgwOTk2","html_url":"https://github.com/wolox-training/mlc-rails/pull/12","diff_url":"https://github.com/wolox-training/mlc-rails/pull/12.diff","patch_url":"https://github.com/wolox-training/mlc-rails/pull/12.patch","issue_url":"https://api.github.com/repos/wolox-training/mlc-rails/issues/12","number":12,"state":"closed","locked":false,"title":"Rent model","user":{"login":"micaelacole","id":44203835,"node_id":"MDQ6VXNlcjQ0MjAzODM1","avatar_url":"https://avatars2.githubusercontent.com/u/44203835?v=4","gravatar_id":"","url":"https://api.github.com/users/micaelacole","html_url":"https://github.com/micaelacole","followers_url":"https://api.github.com/users/micaelacole/followers","following_url":"https://api.github.com/users/micaelacole/following{/other_user}","gists_url":"https://api.github.com/users/micaelacole/gists{/gist_id}","starred_url":"https://api.github.com/users/micaelacole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micaelacole/subscriptions","organizations_url":"https://api.github.com/users/micaelacole/orgs","repos_url":"https://api.github.com/users/micaelacole/repos","events_url":"https://api.github.com/users/micaelacole/events{/privacy}","received_events_url":"https://api.github.com/users/micaelacole/received_events","type":"User","site_admin":false},"body":"# Summary\r\nA Rent model is created, with references to the User and Book models, and date-type fields for the start date and end date of the rental.\r\n\r\nAfter creating the model with its migration, a Rent instance can be created within the Ruby console (irb). Since it references or _belongs_to_ certain book and user, it is necessary to create an instance of these two classes first. For example:\r\n\r\n-  `User.create(first_name: \"Test\", last_name: \"TestLastName\", email: \"test@wolox.com.ar\", password: \"123123123\", password_confirmation: \"123123123\")`\r\n\r\n- `Book.create(genre: \"Fantasy\", title: \"The Chronicles of Narnia: The Lion, the Witch and the Wardrobe\", author: \"C. S. Lewis\", cover_image: \"narnia_cover.jpg\", publisher: \"Geoffrey Bles\", year: \"1950\")`\r\n\r\n- `Rent.create(user: User.first, book: Book.first, start_date: Date.new(2018, 8, 5), end_date: Date.new(2018, 8, 9))`\r\n\r\nWith those three tasks, a Rent instance can be created, returning: `#<Rent id: 1, user_id: 1, book_id: 1, start_date: \"2018-08-05\", end_date: \"2018-08-09\", created_at: \"2018-10-30 20:11:04\", updated_at: \"2018-10-30 20:11:04\">`\r\n\r\n# Trello Card\r\nhttps://trello.com/c/B98A8RY0","created_at":"2018-11-02T15:52:12Z","updated_at":"2018-11-12T17:37:26Z","closed_at":"2018-11-12T17:37:26Z","merged_at":"2018-11-12T17:37:26Z","merge_commit_sha":"e626792e3703ef157be4e33442c9ccc958c48909","assignee":{"login":"nicozar95","id":11698687,"node_id":"MDQ6VXNlcjExNjk4Njg3","avatar_url":"https://avatars1.githubusercontent.com/u/11698687?v=4","gravatar_id":"","url":"https://api.github.com/users/nicozar95","html_url":"https://github.com/nicozar95","followers_url":"https://api.github.com/users/nicozar95/followers","following_url":"https://api.github.com/users/nicozar95/following{/other_user}","gists_url":"https://api.github.com/users/nicozar95/gists{/gist_id}","starred_url":"https://api.github.com/users/nicozar95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicozar95/subscriptions","organizations_url":"https://api.github.com/users/nicozar95/orgs","repos_url":"https://api.github.com/users/nicozar95/repos","events_url":"https://api.github.com/users/nicozar95/events{/privacy}","received_events_url":"https://api.github.com/users/nicozar95/received_events","type":"User","site_admin":false},"assignees":[{"login":"nicozar95","id":11698687,"node_id":"MDQ6VXNlcjExNjk4Njg3","avatar_url":"https://avatars1.githubusercontent.com/u/11698687?v=4","gravatar_id":"","url":"https://api.github.com/users/nicozar95","html_url":"https://github.com/nicozar95","followers_url":"https://api.github.com/users/nicozar95/followers","following_url":"https://api.github.com/users/nicozar95/following{/other_user}","gists_url":"https://api.github.com/users/nicozar95/gists{/gist_id}","starred_url":"https://api.github.com/users/nicozar95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicozar95/subscriptions","organizations_url":"https://api.github.com/users/nicozar95/orgs","repos_url":"https://api.github.com/users/nicozar95/repos","events_url":"https://api.github.com/users/nicozar95/events{/privacy}","received_events_url":"https://api.github.com/users/nicozar95/received_events","type":"User","site_admin":false},{"login":"facucompe","id":12786130,"node_id":"MDQ6VXNlcjEyNzg2MTMw","avatar_url":"https://avatars2.githubusercontent.com/u/12786130?v=4","gravatar_id":"","url":"https://api.github.com/users/facucompe","html_url":"https://github.com/facucompe","followers_url":"https://api.github.com/users/facucompe/followers","following_url":"https://api.github.com/users/facucompe/following{/other_user}","gists_url":"https://api.github.com/users/facucompe/gists{/gist_id}","starred_url":"https://api.github.com/users/facucompe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facucompe/subscriptions","organizations_url":"https://api.github.com/users/facucompe/orgs","repos_url":"https://api.github.com/users/facucompe/repos","events_url":"https://api.github.com/users/facucompe/events{/privacy}","received_events_url":"https://api.github.com/users/facucompe/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wolox-training/mlc-rails/pulls/12/commits","review_comments_url":"https://api.github.com/repos/wolox-training/mlc-rails/pulls/12/comments","review_comment_url":"https://api.github.com/repos/wolox-training/mlc-rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wolox-training/mlc-rails/issues/12/comments","statuses_url":"https://api.github.com/repos/wolox-training/mlc-rails/statuses/b6eedb547a5c3d98c3e9aa3615e0070e1ae2adc8","head":{"label":"wolox-training:rent-model-config","ref":"rent-model-config","sha":"b6eedb547a5c3d98c3e9aa3615e0070e1ae2adc8","user":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":153282990,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMyODI5OTA=","name":"mlc-rails","full_name":"wolox-training/mlc-rails","private":false,"owner":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wolox-training/mlc-rails","description":null,"fork":false,"url":"https://api.github.com/repos/wolox-training/mlc-rails","forks_url":"https://api.github.com/repos/wolox-training/mlc-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/mlc-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/mlc-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/mlc-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/mlc-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/mlc-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/mlc-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/mlc-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/mlc-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/mlc-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/mlc-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/mlc-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/mlc-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/mlc-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/mlc-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/mlc-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/mlc-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/mlc-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/mlc-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/mlc-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/mlc-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/mlc-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/mlc-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/mlc-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/mlc-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/mlc-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/mlc-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/mlc-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/mlc-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/mlc-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/mlc-rails/deployments","created_at":"2018-10-16T12:38:31Z","updated_at":"2018-10-30T21:22:17Z","pushed_at":"2018-11-12T17:37:25Z","git_url":"git://github.com/wolox-training/mlc-rails.git","ssh_url":"git@github.com:wolox-training/mlc-rails.git","clone_url":"https://github.com/wolox-training/mlc-rails.git","svn_url":"https://github.com/wolox-training/mlc-rails","homepage":null,"size":5417,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"wolox-training:master","ref":"master","sha":"7dbe42de2b361b330a7082c2794575b47e065229","user":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":153282990,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMyODI5OTA=","name":"mlc-rails","full_name":"wolox-training/mlc-rails","private":false,"owner":{"login":"wolox-training","id":14113351,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTEzMzUx","avatar_url":"https://avatars1.githubusercontent.com/u/14113351?v=4","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wolox-training/mlc-rails","description":null,"fork":false,"url":"https://api.github.com/repos/wolox-training/mlc-rails","forks_url":"https://api.github.com/repos/wolox-training/mlc-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/mlc-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/mlc-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/mlc-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/mlc-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/mlc-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/mlc-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/mlc-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/mlc-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/mlc-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/mlc-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/mlc-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/mlc-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/mlc-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/mlc-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/mlc-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/mlc-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/mlc-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/mlc-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/mlc-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/mlc-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/mlc-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/mlc-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/mlc-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/mlc-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/mlc-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/mlc-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/mlc-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/mlc-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/mlc-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/mlc-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/mlc-rails/deployments","created_at":"2018-10-16T12:38:31Z","updated_at":"2018-10-30T21:22:17Z","pushed_at":"2018-11-12T17:37:25Z","git_url":"git://github.com/wolox-training/mlc-rails.git","ssh_url":"git@github.com:wolox-training/mlc-rails.git","clone_url":"https://github.com/wolox-training/mlc-rails.git","svn_url":"https://github.com/wolox-training/mlc-rails","homepage":null,"size":5417,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolox-training/mlc-rails/pulls/12"},"html":{"href":"https://github.com/wolox-training/mlc-rails/pull/12"},"issue":{"href":"https://api.github.com/repos/wolox-training/mlc-rails/issues/12"},"comments":{"href":"https://api.github.com/repos/wolox-training/mlc-rails/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/wolox-training/mlc-rails/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/wolox-training/mlc-rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wolox-training/mlc-rails/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/wolox-training/mlc-rails/statuses/b6eedb547a5c3d98c3e9aa3615e0070e1ae2adc8"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"micaelacole","id":44203835,"node_id":"MDQ6VXNlcjQ0MjAzODM1","avatar_url":"https://avatars2.githubusercontent.com/u/44203835?v=4","gravatar_id":"","url":"https://api.github.com/users/micaelacole","html_url":"https://github.com/micaelacole","followers_url":"https://api.github.com/users/micaelacole/followers","following_url":"https://api.github.com/users/micaelacole/following{/other_user}","gists_url":"https://api.github.com/users/micaelacole/gists{/gist_id}","starred_url":"https://api.github.com/users/micaelacole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micaelacole/subscriptions","organizations_url":"https://api.github.com/users/micaelacole/orgs","repos_url":"https://api.github.com/users/micaelacole/repos","events_url":"https://api.github.com/users/micaelacole/events{/privacy}","received_events_url":"https://api.github.com/users/micaelacole/received_events","type":"User","site_admin":false},"comments":0,"review_comments":12,"maintainer_can_modify":false,"commits":37,"additions":178,"deletions":11,"changed_files":18}}
{"actor":{"display_login":"micaelacole"}}