{"action":"closed","number":822,"pull_request":{"url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/pulls/822","id":49054304,"html_url":"https://github.com/thoughtbot/shoulda-matchers/pull/822","diff_url":"https://github.com/thoughtbot/shoulda-matchers/pull/822.diff","patch_url":"https://github.com/thoughtbot/shoulda-matchers/pull/822.patch","issue_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/822","number":822,"state":"closed","locked":false,"title":"Numericality validation of virtual attributes","user":{"login":"bdmac","id":47326,"avatar_url":"https://avatars.githubusercontent.com/u/47326?v=3","gravatar_id":"","url":"https://api.github.com/users/bdmac","html_url":"https://github.com/bdmac","followers_url":"https://api.github.com/users/bdmac/followers","following_url":"https://api.github.com/users/bdmac/following{/other_user}","gists_url":"https://api.github.com/users/bdmac/gists{/gist_id}","starred_url":"https://api.github.com/users/bdmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdmac/subscriptions","organizations_url":"https://api.github.com/users/bdmac/orgs","repos_url":"https://api.github.com/users/bdmac/repos","events_url":"https://api.github.com/users/bdmac/events{/privacy}","received_events_url":"https://api.github.com/users/bdmac/received_events","type":"User","site_admin":false},"body":"Commit 18b2859d2522a4866c398b9a32ebc3de4ec79389 broke numericality\r\nvalidation of virtual attributes in ActiveRecord models. This commit\r\nadded a `column_type` method that assumes if `columns_hash` is a thing\r\nthen our attribute would be present within it. This is not true for\r\nvirtual attributes and leads to:\r\n```\r\n     NoMethodError:\r\n           undefined method `type' for nil:NilClass\r\n         # /Users/bdmac/.gem/ruby/2.2.2/gems/shoulda-matchers-3.0.1/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb:442:in\r\n         # `column_type'\r\n```\r\n\r\nThis adds a check to `column_type` to return nil instead of throwing an\r\nexception if a specified attribute does not exist in the `columns_hash`\r\nbecause it is virtual.","created_at":"2015-10-28T19:22:22Z","updated_at":"2016-01-07T19:14:26Z","closed_at":"2016-01-07T19:14:26Z","merged_at":null,"merge_commit_sha":"0aefb22f81b238405dd9d59ff73fac8e53e20d13","assignee":null,"milestone":{"url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/milestones/11","html_url":"https://github.com/thoughtbot/shoulda-matchers/milestones/3.0.2","labels_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/milestones/11/labels","id":1423509,"number":11,"title":"3.0.2","description":"","creator":{"login":"mcmire","id":7371,"avatar_url":"https://avatars.githubusercontent.com/u/7371?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmire","html_url":"https://github.com/mcmire","followers_url":"https://api.github.com/users/mcmire/followers","following_url":"https://api.github.com/users/mcmire/following{/other_user}","gists_url":"https://api.github.com/users/mcmire/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmire/subscriptions","organizations_url":"https://api.github.com/users/mcmire/orgs","repos_url":"https://api.github.com/users/mcmire/repos","events_url":"https://api.github.com/users/mcmire/events{/privacy}","received_events_url":"https://api.github.com/users/mcmire/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":6,"state":"open","created_at":"2015-11-22T02:20:40Z","updated_at":"2016-01-07T19:14:26Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/pulls/822/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/pulls/822/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/822/comments","statuses_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/statuses/1cf0b8521cfecc1bf6c2b84c7448131f7d90ff4d","head":{"label":"CheckMateIO:bugfix/numericality-of-virtual-attributes","ref":"bugfix/numericality-of-virtual-attributes","sha":"1cf0b8521cfecc1bf6c2b84c7448131f7d90ff4d","user":{"login":"CheckMateIO","id":3219568,"avatar_url":"https://avatars.githubusercontent.com/u/3219568?v=3","gravatar_id":"","url":"https://api.github.com/users/CheckMateIO","html_url":"https://github.com/CheckMateIO","followers_url":"https://api.github.com/users/CheckMateIO/followers","following_url":"https://api.github.com/users/CheckMateIO/following{/other_user}","gists_url":"https://api.github.com/users/CheckMateIO/gists{/gist_id}","starred_url":"https://api.github.com/users/CheckMateIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheckMateIO/subscriptions","organizations_url":"https://api.github.com/users/CheckMateIO/orgs","repos_url":"https://api.github.com/users/CheckMateIO/repos","events_url":"https://api.github.com/users/CheckMateIO/events{/privacy}","received_events_url":"https://api.github.com/users/CheckMateIO/received_events","type":"Organization","site_admin":false},"repo":{"id":45125671,"name":"shoulda-matchers","full_name":"CheckMateIO/shoulda-matchers","owner":{"login":"CheckMateIO","id":3219568,"avatar_url":"https://avatars.githubusercontent.com/u/3219568?v=3","gravatar_id":"","url":"https://api.github.com/users/CheckMateIO","html_url":"https://github.com/CheckMateIO","followers_url":"https://api.github.com/users/CheckMateIO/followers","following_url":"https://api.github.com/users/CheckMateIO/following{/other_user}","gists_url":"https://api.github.com/users/CheckMateIO/gists{/gist_id}","starred_url":"https://api.github.com/users/CheckMateIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheckMateIO/subscriptions","organizations_url":"https://api.github.com/users/CheckMateIO/orgs","repos_url":"https://api.github.com/users/CheckMateIO/repos","events_url":"https://api.github.com/users/CheckMateIO/events{/privacy}","received_events_url":"https://api.github.com/users/CheckMateIO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CheckMateIO/shoulda-matchers","description":"Collection of testing matchers extracted from Shoulda","fork":true,"url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers","forks_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/forks","keys_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/teams","hooks_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/hooks","issue_events_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/issues/events{/number}","events_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/events","assignees_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/assignees{/user}","branches_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/branches{/branch}","tags_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/tags","blobs_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/git/refs{/sha}","trees_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/statuses/{sha}","languages_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/languages","stargazers_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/stargazers","contributors_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/contributors","subscribers_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/subscribers","subscription_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/subscription","commits_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/commits{/sha}","git_commits_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/git/commits{/sha}","comments_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/comments{/number}","issue_comment_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/issues/comments{/number}","contents_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/contents/{+path}","compare_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/merges","archive_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/downloads","issues_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/issues{/number}","pulls_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/pulls{/number}","milestones_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/milestones{/number}","notifications_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/labels{/name}","releases_url":"https://api.github.com/repos/CheckMateIO/shoulda-matchers/releases{/id}","created_at":"2015-10-28T16:20:31Z","updated_at":"2015-10-28T16:20:33Z","pushed_at":"2015-10-29T16:16:16Z","git_url":"git://github.com/CheckMateIO/shoulda-matchers.git","ssh_url":"git@github.com:CheckMateIO/shoulda-matchers.git","clone_url":"https://github.com/CheckMateIO/shoulda-matchers.git","svn_url":"https://github.com/CheckMateIO/shoulda-matchers","homepage":"http://matchers.shoulda.io","size":12978,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"0e9c48e8cc16b081b9cf91068f94e0385720851b","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":1172597,"name":"shoulda-matchers","full_name":"thoughtbot/shoulda-matchers","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/shoulda-matchers","description":"Collection of testing matchers extracted from Shoulda","fork":false,"url":"https://api.github.com/repos/thoughtbot/shoulda-matchers","forks_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/forks","keys_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/teams","hooks_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/events","assignees_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/tags","blobs_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/subscription","commits_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/merges","archive_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/downloads","issues_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/releases{/id}","created_at":"2010-12-15T22:41:52Z","updated_at":"2016-01-07T17:04:52Z","pushed_at":"2016-01-07T19:13:43Z","git_url":"git://github.com/thoughtbot/shoulda-matchers.git","ssh_url":"git@github.com:thoughtbot/shoulda-matchers.git","clone_url":"https://github.com/thoughtbot/shoulda-matchers.git","svn_url":"https://github.com/thoughtbot/shoulda-matchers","homepage":"http://matchers.shoulda.io","size":14447,"stargazers_count":1494,"watchers_count":1494,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":428,"mirror_url":null,"open_issues_count":82,"forks":428,"open_issues":82,"watchers":1494,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/shoulda-matchers/pulls/822"},"html":{"href":"https://github.com/thoughtbot/shoulda-matchers/pull/822"},"issue":{"href":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/822"},"comments":{"href":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/822/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/shoulda-matchers/pulls/822/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/shoulda-matchers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/shoulda-matchers/pulls/822/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/shoulda-matchers/statuses/1cf0b8521cfecc1bf6c2b84c7448131f7d90ff4d"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":5,"review_comments":18,"commits":3,"additions":92,"deletions":1,"changed_files":2}}