solnic / virtus

[DISCONTINUED ] Attributes on Steroids for Plain Old Ruby Objects
MIT License
3.77k stars 229 forks source link

Strict mode for Boolean doesn't raise an error #219

Closed tsyber1an closed 10 years ago

tsyber1an commented 10 years ago
2.0.0p247 :001 > require 'virtus'
 => true
2.0.0p247 :002 > class User
2.0.0p247 :003?>     include Virtus.model(:strict => true)
2.0.0p247 :004?>
2.0.0p247 :005 >       attribute :admin, Boolean
2.0.0p247 :006?>   end
 => User
2.0.0p247 :009 >   User.new :admin => "can't really say if true or false"
 => #<User:0x007f95a38bb060 @admin="can't really say if true or false">
elskwid commented 10 years ago

@funfun, I have verified that this is an error but only for Boolean attributes. I have changed the name of the issue accordingly and will be working on a fix.

Thank you!