Module: Decidim::Admin::AreasHelper
- Defined in:
- app/helpers/decidim/admin/areas_helper.rb
Overview
This module includes helpers to show areas in admin
Defined Under Namespace
Classes: Option
Instance Method Summary collapse
-
#organization_area_types(organization = current_organization) ⇒ Object
Public: A formatted collection of areas for a given organization to be used in forms.
Instance Method Details
#organization_area_types(organization = current_organization) ⇒ Object
Public: A formatted collection of areas for a given organization to be used in forms.
organization - Organization object
Returns an Array.
15 16 17 18 19 20 |
# File 'app/helpers/decidim/admin/areas_helper.rb', line 15 def organization_area_types(organization = current_organization) [Option.new("", "-")] + organization.area_types.map do |area_type| Option.new(area_type.id, translated_attribute(area_type.name)) end end |