Class: Decidim::Log::ValueTypes::CurrencyPresenter
- Inherits:
-
DefaultPresenter
- Object
- DefaultPresenter
- Decidim::Log::ValueTypes::CurrencyPresenter
- Defined in:
- app/presenters/decidim/log/value_types/currency_presenter.rb
Overview
This class presents the given value as a currency. Check the ‘DefaultPresenter` for more info on how value presenters work.
Instance Method Summary collapse
-
#present ⇒ Object
Public: Presents the value as a currency.
Methods inherited from DefaultPresenter
Constructor Details
This class inherits a constructor from Decidim::Log::ValueTypes::DefaultPresenter
Instance Method Details
#present ⇒ Object
Public: Presents the value as a currency.
Returns an HTML-safe String.
13 14 15 16 17 |
# File 'app/presenters/decidim/log/value_types/currency_presenter.rb', line 13 def present return unless value h.number_to_currency(value, unit: Decidim.currency_unit) end |