Method: StandardAPI::TestCase#normalize_attribute
- Defined in:
- lib/standard_api/test_case.rb
#normalize_attribute(record, attribute, value) ⇒ Object
69 70 71 72 73 74 75 76 77 |
# File 'lib/standard_api/test_case.rb', line 69 def normalize_attribute(record, attribute, value) if normalizers[self.class.model] && normalizers[self.class.model][attribute] b = normalizers[self.class.model][attribute] b.arity == 2 ? b.call(record, value) : b.call(value) else # validators = self.class.model.validators_on(attribute) value end end |