Last Updated: February 25, 2016
·
203
· lucianosousa

How to create the proper migration with boolean value in your ruby/rails app

In your migration file, instead of:

t.boolean :my_attr

do that:

t.boolean :my_attr, default: false, null: false