Class: Decidim::ActionDelegator::VotedWithPonderations

Inherits:
Query
  • Object
show all
Defined in:
app/queries/decidim/action_delegator/voted_with_ponderations.rb

Instance Method Summary collapse

Constructor Details

#initialize(relation) ⇒ VotedWithPonderations

Returns a new instance of VotedWithPonderations.



6
7
8
# File 'app/queries/decidim/action_delegator/voted_with_ponderations.rb', line 6

def initialize(relation)
  @relation = relation
end

Instance Method Details

#queryObject



10
11
12
13
14
# File 'app/queries/decidim/action_delegator/voted_with_ponderations.rb', line 10

def query
  relation
    .joins(:votes)
    .joins(ponderation_sql)
end