Reputation: 6714
is there something like:
validates_value_of :verified,:with=>1
to validate the boolean field on the model?
Upvotes: 3
Views: 2041
Reputation: 16284
If you want it to always be true, use validates_acceptance_of. If you want it be either true or false, use validates_inclusion_of.
validates_acceptance_of :verified
validates_inclusion_of :verified, :in => [ true, false ]
Upvotes: 5