Sha256: c46adf2373b8c761b11ac26d94713f9d2ff9fdbda7701b8429891f0079e64140
Contents?: true
Size: 727 Bytes
Versions: 25
Compression:
Stored size: 727 Bytes
Contents
# frozen_string_literal: true module Decidim module Initiatives # Class uses to retrieve the available initiative types. class InitiativeTypes < Decidim::Query # Syntactic sugar to initialize the class and return the queried objects. # # organization - Decidim::Organization def self.for(organization) new(organization).query end # Initializes the class. # # organization - Decidim::Organization def initialize(organization) @organization = organization end # Retrieves the available initiative types for the given organization. def query InitiativesType.where(organization: @organization) end end end end
Version data entries
25 entries across 25 versions & 1 rubygems