Module: Granite::Action::Translations

Extended by:
ActiveSupport::Concern
Included in:
Granite::Action
Defined in:
lib/granite/action/translations.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#translate(*args, **options) ⇒ Object Also known as: t



18
19
20
21
# File 'lib/granite/action/translations.rb', line 18

def translate(*args, **options)
  key, options = Granite::Translations.scope_translation_args(self.class.i18n_scopes, *args, **options)
  I18n.t(key, **options)
end