Sha256: 2a5320861fbe3e457e5bc071239719803a71edc265f60fed39bae94d315f684a
Contents?: true
Size: 523 Bytes
Versions: 12
Compression:
Stored size: 523 Bytes
Contents
module AzaharaSchemaCurrency module AttributeFormatterPatch def format_value_html(attribute, unformated_value, **options) case attribute.type when 'currency' Money.new(unformated_value, options[:currency_code].to_s.upercase.presence).format else super end end def formatting_options(attribute, entity) case attribute.type when 'currency' {currency_code: attribute.currency_code(entity).to_s} else super end end end end
Version data entries
12 entries across 12 versions & 1 rubygems