Class: Decidim::Amendment::VisibilityStepSetting
- Inherits:
-
Object
- Object
- Decidim::Amendment::VisibilityStepSetting
- Defined in:
- app/models/decidim/amendment.rb
Overview
VisibilityStepSetting::options can be expanded via config setting.
For new options, add the missing locales in ‘decidim-core/config/locales/en.yml` and change the logic of the filtering methods in the Amendable concern to fit your needs:
-
Decidim::Amendable::only_visible_emendations_for(user, component)
-
Decidim::Amendable::amendables_and_visible_emendations_for(user, component)
-
Decidim::Amendable#visible_emendations_for(user)
Returns an Array of Arrays of translation, value: i.e. [[“All amendments are visible”, “all”], …]
Class Method Summary collapse
Class Method Details
.options ⇒ Object
43 44 45 46 47 |
# File 'app/models/decidim/amendment.rb', line 43 def self. Decidim.config..map do |option| [I18n.t(option, scope: "decidim.amendments.visibility_options"), option] end end |