Set default value in rails model

I like to set default values in my models. This is the method I like to use.

def after_initialize
  if new_record?
    self.upper_quantity ||= 0.0
  end
end