def field_coercion
      self.class.fields.each do |name, field|
        field.type
        value = attributes[name]
        unless value.nil? || coercable?(value, field.type)
          errors.add name, "should be a(n) #{field.type}"
        end
      end
    end
def field_coercion
      self.class.fields.each do |name, field|
        field.type
        value = attributes[name]
        unless value.nil? || coercable?(value, field.type)
          errors.add name, "should be a(n) #{field.type}"
        end
      end
    end
----------