Class: Decidim::ActionDelegator::OrganizationDelegations
- Inherits:
-
Query
- Object
- Query
- Decidim::ActionDelegator::OrganizationDelegations
- Defined in:
- app/queries/decidim/action_delegator/organization_delegations.rb
Instance Method Summary collapse
-
#initialize(organization) ⇒ OrganizationDelegations
constructor
A new instance of OrganizationDelegations.
- #query ⇒ Object
Constructor Details
#initialize(organization) ⇒ OrganizationDelegations
Returns a new instance of OrganizationDelegations.
6 7 8 |
# File 'app/queries/decidim/action_delegator/organization_delegations.rb', line 6 def initialize(organization) @organization = organization end |
Instance Method Details
#query ⇒ Object
10 11 12 13 14 15 |
# File 'app/queries/decidim/action_delegator/organization_delegations.rb', line 10 def query Delegation .joins(setting: :consultation) .merge(organization_consultations) .includes(:grantee, :granter) end |