Module: Granite::Action::Translations::ClassMethods

Defined in:
lib/granite/action/translations.rb

Instance Method Summary collapse

Instance Method Details

#i18n_scopeObject



7
8
9
# File 'lib/granite/action/translations.rb', line 7

def i18n_scope
  :granite_action
end

#i18n_scopesObject



11
12
13
14
15
# File 'lib/granite/action/translations.rb', line 11

def i18n_scopes
  lookup_ancestors.flat_map do |klass|
    :"#{klass.i18n_scope}.#{klass.model_name.i18n_key}"
  end + [nil]
end