internetsistemas / guides

A guide for programming gracefully.
25 stars 13 forks source link

NOT NULL fields and validations. #34

Open brunoocasali opened 8 years ago

brunoocasali commented 8 years ago

Hello!

Following our guides, we don't need to use t.string :name, null: false for example in our migrations, but is good to database when rails fails (if it fails). What did you think about it? Is a good tip add this and refactor our code?

Thx!

felipefontoura commented 8 years ago

@brunoocasali it's a good idea to add t.string :name, null: false to our migrations.