Class: Decidim::ActionDelegator::DelegationVotes
- Inherits:
-
Query
- Object
- Query
- Decidim::ActionDelegator::DelegationVotes
- Defined in:
- app/queries/decidim/action_delegator/delegation_votes.rb
Overview
This query object replaces the ActiveRecord association we would have between the Vote and Delegation models. Unfortunately we can’t use custom foreign keys on both ends of the association so this aims to replace ‘delegation.votes`.
Instance Method Summary collapse
Instance Method Details
#query ⇒ Object
9 10 11 12 13 |
# File 'app/queries/decidim/action_delegator/delegation_votes.rb', line 9 def query Delegation.joins( delegations.join(votes).on().join_sources ) end |