Sha256: 0d4de55e8e0e9dc3d4bd1c85e1101dd53df12880da4b5cc82c811ed24339a5fd

Contents?: true

Size: 399 Bytes

Versions: 6

Compression:

Stored size: 399 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Elections
    module Votes
      # A class used to find votes for a specific user
      class UserVotes < Rectify::Query
        def initialize(user)
          @user = user
        end

        # Finds the votes for a specific user
        def query
          Decidim::Elections::Vote.where(user: @user)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-elections-0.24.3 app/queries/decidim/elections/votes/user_votes.rb
decidim-elections-0.24.2 app/queries/decidim/elections/votes/user_votes.rb
decidim-elections-0.24.1 app/queries/decidim/elections/votes/user_votes.rb
decidim-elections-0.24.0 app/queries/decidim/elections/votes/user_votes.rb
decidim-elections-0.24.0.rc2 app/queries/decidim/elections/votes/user_votes.rb
decidim-elections-0.24.0.rc1 app/queries/decidim/elections/votes/user_votes.rb