Module: Hyrax::PermissionLevelsHelper
- Included in:
- HyraxHelperBehavior
- Defined in:
- app/helpers/hyrax/permission_levels_helper.rb
Instance Method Summary collapse
-
#configured_owner_permission_levels ⇒ Hash<String, String>
A map from i18nized strings to permission level keywords.
-
#configured_permission_levels ⇒ Hash<String, String>
A map from i18nized strings to permission level keywords.
-
#configured_permission_options ⇒ Hash<String, String>
A map from i18nized strings to permission level keywords.
Instance Method Details
#configured_owner_permission_levels ⇒ Hash<String, String>
Returns a map from i18nized strings to permission level keywords.
17 18 19 20 21 |
# File 'app/helpers/hyrax/permission_levels_helper.rb', line 17 def Hyrax.config..values.index_by do |level| I18n.t("hyrax.permission_levels.owner.#{level}") end end |
#configured_permission_levels ⇒ Hash<String, String>
Returns a map from i18nized strings to permission level keywords.
8 9 10 11 12 |
# File 'app/helpers/hyrax/permission_levels_helper.rb', line 8 def Hyrax.config..values.index_by do |level| I18n.t("hyrax.permission_levels.#{level}") end end |
#configured_permission_options ⇒ Hash<String, String>
Returns a map from i18nized strings to permission level keywords.
26 27 28 29 30 |
# File 'app/helpers/hyrax/permission_levels_helper.rb', line 26 def Hyrax.config..values.index_by do |option| I18n.t("hyrax.permission_levels.options.#{option}") end end |