Sha256: be4bf02eccc0daff5cbc9e98a160538509d381819c9e655c1a345d19d65767af
Contents?: true
Size: 641 Bytes
Versions: 90
Compression:
Stored size: 641 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # This module includes helpers to show areas in admin module AreasHelper Option = Struct.new(:id, :name) # Public: A formatted collection of areas for a given organization to be used # in forms. # # organization - Organization object # # Returns an Array. 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 end end end
Version data entries
90 entries across 90 versions & 1 rubygems