Sha256: 14ef086bfd19d2edf417284c26beac15aace8cca3dd3dcb186a98cc109411b38

Contents?: true

Size: 571 Bytes

Versions: 53

Compression:

Stored size: 571 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Initiatives
    # Class uses to retrieve initiatives that have been a long time in validating
    # state
    class SupportPeriodFinishedInitiatives < Rectify::Query
      # Retrieves the initiatives ready to be evaluated to decide if they've been
      # accepted or not.
      def query
        Decidim::Initiative
          .includes(:scoped_type)
          .where(state: "published")
          .where(signature_type: "online")
          .where("signature_end_date < ?", Date.current)
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
decidim-initiatives-0.17.2 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.18.0 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.17.1 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.16.1 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.17.0 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.16.0 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.15.2 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.15.1 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.15.0 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.14.4 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.14.3 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.14.2 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.14.1 app/queries/decidim/initiatives/support_period_finished_initiatives.rb