Module: MtkFramework::ActiveInteractionConcerns::I18nable

Extended by:
ActiveSupport::Concern
Defined in:
lib/mtk_framework/active_interaction_concerns/i18nable.rb

Instance Method Summary collapse

Instance Method Details

#i18n_scopeObject



8
9
10
# File 'lib/mtk_framework/active_interaction_concerns/i18nable.rb', line 8

def i18n_scope
  "#{self.class.i18n_scope}.#{self.class.name.underscore}"
end

#t(*args, **h_args) ⇒ Object



12
13
14
15
# File 'lib/mtk_framework/active_interaction_concerns/i18nable.rb', line 12

def t(*args, **h_args)
  h_args.reverse_merge!(scope: i18n_scope)
  I18n.t(*args, **h_args)
end