What is the best practice for handling ActiveRecord attributes in
logic when those attributes were allowed to be nil? I’ve been handling
the possibly-nil status of my Numeric attributes in my logic by
calling to_f (to_i) on them, but I wonder if there’s a better
practice? For example, default values could be set in the migration or
validations could set blank fields to a default.
Any suggestions on the best practice in this case?