{"action":"created","issue":{"url":"https://api.github.com/repos/brycesenz/validates_serialized/issues/5","labels_url":"https://api.github.com/repos/brycesenz/validates_serialized/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/brycesenz/validates_serialized/issues/5/comments","events_url":"https://api.github.com/repos/brycesenz/validates_serialized/issues/5/events","html_url":"https://github.com/brycesenz/validates_serialized/issues/5","id":109596570,"number":5,"title":"Error validating hashes, Rails 4!","user":{"login":"mparodi","id":1238560,"avatar_url":"https://avatars.githubusercontent.com/u/1238560?v=3","gravatar_id":"","url":"https://api.github.com/users/mparodi","html_url":"https://github.com/mparodi","followers_url":"https://api.github.com/users/mparodi/followers","following_url":"https://api.github.com/users/mparodi/following{/other_user}","gists_url":"https://api.github.com/users/mparodi/gists{/gist_id}","starred_url":"https://api.github.com/users/mparodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mparodi/subscriptions","organizations_url":"https://api.github.com/users/mparodi/orgs","repos_url":"https://api.github.com/users/mparodi/repos","events_url":"https://api.github.com/users/mparodi/events{/privacy}","received_events_url":"https://api.github.com/users/mparodi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-03T01:42:49Z","updated_at":"2015-10-07T16:33:43Z","closed_at":null,"body":"I'm getting an error validating serialized hashes, but I haven't tried anything else yet so it could be happening for other types too.\r\n\r\nThe code I used is pretty much the same as in the README here, the relevant part is:\r\n\r\n```ruby\r\nserialize :ratings, Hash\r\nvalidates_hash_values_with :ratings, numericality: { greater_than: 0 }\r\n```\r\n\r\nThe error I'm getting is:\r\n\r\n```\r\nNoMethodError: undefined method `new' for :ratings:Symbol\r\n~/.rvm/gems/ruby-2.2.1/gems/validates_serialized-0.0.8/lib/validates_serialized/validators/serialized_validator.rb:12:in `block in initialize'\r\n~/.rvm/gems/ruby-2.2.1/gems/validates_serialized-0.0.8/lib/validates_serialized/validators/serialized_validator.rb:11:in `each'\r\n~/.rvm/gems/ruby-2.2.1/gems/validates_serialized-0.0.8/lib/validates_serialized/validators/serialized_validator.rb:11:in `initialize'\r\n~/.rvm/gems/ruby-2.2.1/gems/validates_serialized-0.0.8/lib/validates_serialized/validators/hash_validator.rb:22:in `new'\r\n~/.rvm/gems/ruby-2.2.1/gems/validates_serialized-0.0.8/lib/validates_serialized/validators/hash_validator.rb:22:in `validates_hash_values_with'\r\n...\r\n```\r\n\r\nSome versions that may be relevant:\r\n\r\n```\r\nUsing activesupport 4.2.1\r\nUsing activemodel 4.2.1\r\nUsing activerecord 4.2.1\r\nUsing dm-core 1.2.1\r\nUsing dm-validations 1.2.0\r\nUsing pg 0.18.3\r\nUsing rails 4.2.1\r\nUsing spring 1.4.0\r\nUsing validates_serialized 0.0.8\r\n```\r\n\r\nAny idea?"},"comment":{"url":"https://api.github.com/repos/brycesenz/validates_serialized/issues/comments/146254622","html_url":"https://github.com/brycesenz/validates_serialized/issues/5#issuecomment-146254622","issue_url":"https://api.github.com/repos/brycesenz/validates_serialized/issues/5","id":146254622,"user":{"login":"mparodi","id":1238560,"avatar_url":"https://avatars.githubusercontent.com/u/1238560?v=3","gravatar_id":"","url":"https://api.github.com/users/mparodi","html_url":"https://github.com/mparodi","followers_url":"https://api.github.com/users/mparodi/followers","following_url":"https://api.github.com/users/mparodi/following{/other_user}","gists_url":"https://api.github.com/users/mparodi/gists{/gist_id}","starred_url":"https://api.github.com/users/mparodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mparodi/subscriptions","organizations_url":"https://api.github.com/users/mparodi/orgs","repos_url":"https://api.github.com/users/mparodi/repos","events_url":"https://api.github.com/users/mparodi/events{/privacy}","received_events_url":"https://api.github.com/users/mparodi/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T16:33:43Z","updated_at":"2015-10-07T16:33:43Z","body":"Uh?"}}