Module: RailsCom::ActionView::TranslationHelper
- Defined in:
- lib/rails_com/action_view/translation_helper.rb
Instance Method Summary collapse
Instance Method Details
#default_keys(key) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/rails_com/action_view/translation_helper.rb', line 11 def default_keys(key) [ "#{controller_path.split('/').join('.')}.#{action_name}#{key}".to_sym, "controller#{key}".to_sym ] end |
#t(key, **options) ⇒ Object
6 7 8 9 |
# File 'lib/rails_com/action_view/translation_helper.rb', line 6 def t(key, **) [:default] ||= default_keys(key) super end |