{"action":"created","issue":{"url":"https://api.github.com/repos/mongoid/mongoid-rspec/issues/216","repository_url":"https://api.github.com/repos/mongoid/mongoid-rspec","labels_url":"https://api.github.com/repos/mongoid/mongoid-rspec/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/mongoid/mongoid-rspec/issues/216/comments","events_url":"https://api.github.com/repos/mongoid/mongoid-rspec/issues/216/events","html_url":"https://github.com/mongoid/mongoid-rspec/pull/216","id":321233442,"number":216,"title":"Add support for calling methods with allowed values to inclusion_of","user":{"login":"maciejmajewski","id":374954,"avatar_url":"https://avatars3.githubusercontent.com/u/374954?v=4","gravatar_id":"","url":"https://api.github.com/users/maciejmajewski","html_url":"https://github.com/maciejmajewski","followers_url":"https://api.github.com/users/maciejmajewski/followers","following_url":"https://api.github.com/users/maciejmajewski/following{/other_user}","gists_url":"https://api.github.com/users/maciejmajewski/gists{/gist_id}","starred_url":"https://api.github.com/users/maciejmajewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciejmajewski/subscriptions","organizations_url":"https://api.github.com/users/maciejmajewski/orgs","repos_url":"https://api.github.com/users/maciejmajewski/repos","events_url":"https://api.github.com/users/maciejmajewski/events{/privacy}","received_events_url":"https://api.github.com/users/maciejmajewski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-08T15:22:59Z","updated_at":"2018-05-08T21:57:48Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mongoid/mongoid-rspec/pulls/216","html_url":"https://github.com/mongoid/mongoid-rspec/pull/216","diff_url":"https://github.com/mongoid/mongoid-rspec/pull/216.diff","patch_url":"https://github.com/mongoid/mongoid-rspec/pull/216.patch"},"body":"`ActiveModel::Validations` allows defining symbol (method) that returns enumerable for \"inclusion of\" validator [1]:\r\n\r\n```ruby\r\nvalidates :karma, inclusion: { in: :available_karmas }\r\n# or\r\nvalidates_inclusion_of :karma, in: :available_karmas\r\n\r\ndef available_karmas\r\n  %i[a b]\r\nend\r\n```\r\n\r\nThis PR adds support for this option to `Mongoid::Matchers::Validations::ValidateInclusionOfMatcher`.\r\n\r\n[1] https://github.com/rails/rails/blob/834be61e61a1ed55f056cdff12ffe4cdcaa7ca65/activemodel/lib/active_model/validations/inclusion.rb#L26"},"comment":{"url":"https://api.github.com/repos/mongoid/mongoid-rspec/issues/comments/387555411","html_url":"https://github.com/mongoid/mongoid-rspec/pull/216#issuecomment-387555411","issue_url":"https://api.github.com/repos/mongoid/mongoid-rspec/issues/216","id":387555411,"user":{"login":"dblock","id":542335,"avatar_url":"https://avatars1.githubusercontent.com/u/542335?v=4","gravatar_id":"","url":"https://api.github.com/users/dblock","html_url":"https://github.com/dblock","followers_url":"https://api.github.com/users/dblock/followers","following_url":"https://api.github.com/users/dblock/following{/other_user}","gists_url":"https://api.github.com/users/dblock/gists{/gist_id}","starred_url":"https://api.github.com/users/dblock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblock/subscriptions","organizations_url":"https://api.github.com/users/dblock/orgs","repos_url":"https://api.github.com/users/dblock/repos","events_url":"https://api.github.com/users/dblock/events{/privacy}","received_events_url":"https://api.github.com/users/dblock/received_events","type":"User","site_admin":false},"created_at":"2018-05-08T21:57:48Z","updated_at":"2018-05-08T21:57:48Z","author_association":"COLLABORATOR","body":"One of the actual maintainers of this project should take this ;) @rodrigopinto ? I'm just cheerleading from the top mongoid org."}}
{"actor":{"display_login":"dblock"}}