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.26.10 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.9 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.8 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.7 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.5 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.4 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.3 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.2 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.1 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.0 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.0.rc2 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.26.0.rc1 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.25.2 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.25.1 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.25.0 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.25.0.rc4 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.25.0.rc3 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.25.0.rc2 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.25.0.rc1 app/queries/decidim/initiatives/support_period_finished_initiatives.rb
decidim-initiatives-0.24.3 app/queries/decidim/initiatives/support_period_finished_initiatives.rb