I\'m trying to find the best way to set default values for objects in Rails.
The best I can think of is to set the default value in the new method in
new
For boolean fields in Rails 3.2.6 at least, this will work in your migration.
def change add_column :users, :eula_accepted, :boolean, default: false end
Putting a 1 or 0 for a default will not work here, since it is a boolean field. It must be a true or false value.
1
0
true
false