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 ] }
1.4m articles
1.4m replys
5 comments
57.0k users