Does rails have a validator like validates_numericality_of for boolean or do I need to roll my own?
validates_numericality_of
Since Rails 3, you can do:
validates :field, inclusion: { in: [ true, false ] }
2.1m questions
2.1m answers
60 comments
57.0k users