Sha256: 1479351e386c9a591c6a7d5b31db0230c636f1bd732982c8cc3d87751ea4959b
Contents?: true
Size: 540 Bytes
Versions: 1
Compression:
Stored size: 540 Bytes
Contents
class BusinessStructureFormat def standardize(definition, value) value.upcase end def validate(definition, value) unless ['LLC', 'LLP'].include?(value) 'is not valid' end end end AxleAttributes::Definition.formatters[:business_structure] = BusinessStructureFormat.new class Business < Superstore::Base include AxleAttributes::Model elastic_index.disable! has_attribute :name, type: :string has_attribute :street, type: :string has_attribute :structure, type: :string, format: :business_structure end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axle_attributes-1.13.2 | test/support/business.rb |