Module: Decidim::Initiatives::CreateInitiativeHelper
- Defined in:
- app/helpers/decidim/initiatives/create_initiative_helper.rb
Overview
Helper methods for the create initiative wizard.
Instance Method Summary collapse
- #offline_signature_type_options ⇒ Object
- #online_signature_type_options ⇒ Object
- #signature_type_options ⇒ Object
Instance Method Details
#offline_signature_type_options ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'app/helpers/decidim/initiatives/create_initiative_helper.rb', line 34 def [ [ I18n.t( "offline", scope: %w(activemodel attributes initiative signature_type_values) ), "offline" ] ] end |
#online_signature_type_options ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'app/helpers/decidim/initiatives/create_initiative_helper.rb', line 23 def [ [ I18n.t( "online", scope: %w(activemodel attributes initiative signature_type_values) ), "online" ] ] end |
#signature_type_options ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/helpers/decidim/initiatives/create_initiative_helper.rb', line 7 def return unless Decidim::Initiatives.face_to_face_voting_allowed return unless Decidim::Initiatives.online_voting_allowed = [] Initiative.signature_types.each_key do |type| << [ I18n.t( type, scope: %w(activemodel attributes initiative signature_type_values) ), type ] end end |