Module: I18nUtils::Scope
- Included in:
- Helper
- Defined in:
- lib/i18n_utils.rb
Instance Method Summary collapse
Instance Method Details
#t_scope(key) {|scope| ... } ⇒ Object
18 19 20 21 22 23 |
# File 'lib/i18n_utils.rb', line 18 def t_scope(key) base_key = key.to_s.rpartition(".").first scope = ScopeContext.new(base_key, self) yield(scope) t(key, scope.to_hash).html_safe end |