rails nils in a form

This is probably a simple question, but I noticed a few errors deriving from having empty values instead of nils...

If a user leaves a field blank in a standard rails app is there a way to leave the field in the database set to NULL instead of entering an empty value?

Basically so a check like @model.info.nil? return true instead of having to check if it is both nil and empty?

5
задан holden 3 September 2010 в 19:09
поделиться