Set Default Value in Rails Model Jan 14th, 2013 8:00 am I like to set default values in my models. This is the method I like to use. 1 2 3 4 5 def after_initialize if new_record? self.upper_quantity ||= 0.0 end end