Class: MoneyAttribute::Current
- Inherits:
-
ActiveSupport::CurrentAttributes
- Object
- ActiveSupport::CurrentAttributes
- MoneyAttribute::Current
- Defined in:
- lib/money_attribute/current.rb
Overview
Per-request currency container. Set MoneyAttribute::Current.currency in your controller (or a before_action) to override the configured default for that request. Automatically reset after each request by MoneyAttribute::Middleware.
Instance Method Summary collapse
-
#currency ⇒ String?
Per-request ISO 4217 currency code override.
Instance Method Details
#currency ⇒ String?
Returns per-request ISO 4217 currency code override.
11 |
# File 'lib/money_attribute/current.rb', line 11 attribute :currency |