Module: TypedViewModel::Helpers::I18nHelpers
- Defined in:
- lib/typed_view_model/helpers/i18n_helpers.rb
Overview
Provides i18n helpers in view model objects Include this module when your view model needs translations
Instance Method Summary collapse
- #l(object, **options) ⇒ Object (also: #localize)
- #t(key, **options) ⇒ Object (also: #translate)
Instance Method Details
#l(object, **options) ⇒ Object Also known as: localize
12 13 14 |
# File 'lib/typed_view_model/helpers/i18n_helpers.rb', line 12 def l(object, **) I18n.l(object, **) end |
#t(key, **options) ⇒ Object Also known as: translate
8 9 10 |
# File 'lib/typed_view_model/helpers/i18n_helpers.rb', line 8 def t(key, **) I18n.t(key, **) end |