Sha256: c4b242ee999cdafe87c77da10af207655c7f462169bf411ac0774453721d086a
Contents?: true
Size: 631 Bytes
Versions: 65
Compression:
Stored size: 631 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim module Initiatives # Common methods for elements that need specific behaviour when there is only one initiative type. module SingleInitiativeType extend ActiveSupport::Concern included do helper_method :single_initiative_type? private def current_organization_initiatives_type Decidim::InitiativesType.where(organization: current_organization) end def single_initiative_type? current_organization_initiatives_type.count == 1 end end end end end
Version data entries
65 entries across 65 versions & 1 rubygems