Sha256: 2902712bdb1ed5aaa5ab6c60983e2a24ce979f21e869f18e5d2e701845939b9c
Contents?: true
Size: 520 Bytes
Versions: 53
Compression:
Stored size: 520 Bytes
Contents
module AzaharaSchemaCurrency module PresenterPatch def format_value_html(attribute, unformated_value, **options) case attribute.type when 'currency' Money.from_amount(unformated_value, options[:currency_code].to_s.upcase.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
53 entries across 53 versions & 1 rubygems