def apply_default(name)
      unless attributes.key?(name)
        if field = fields[name]
          default = field.eval_default(self)
          unless default.nil? || field.lazy?
            attribute_will_change!(name)
            attributes[name] = default
          end
        end
      end
    end
def apply_default(name)
      unless attributes.key?(name)
        if field = fields[name]
          default = field.eval_default(self)
          unless default.nil? || field.lazy?
            attribute_will_change!(name)
            attributes[name] = default
          end
        end
      end
    end
Applies a single default value for the given name.

 @example Apply a single default.
   model.apply_default("name")

 @param [ String ] name The name of the field.

 @since 2.4.0