Class: Decidim::ActionDelegator::GranteeDelegations
- Inherits:
-
Object
- Object
- Decidim::ActionDelegator::GranteeDelegations
- Defined in:
- app/queries/decidim/action_delegator/grantee_delegations.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(consultation, user) ⇒ GranteeDelegations
constructor
A new instance of GranteeDelegations.
- #query ⇒ Object
Constructor Details
#initialize(consultation, user) ⇒ GranteeDelegations
Returns a new instance of GranteeDelegations.
10 11 12 13 |
# File 'app/queries/decidim/action_delegator/grantee_delegations.rb', line 10 def initialize(consultation, user) @consultation = consultation @user = user end |
Class Method Details
.for(consultation, user) ⇒ Object
6 7 8 |
# File 'app/queries/decidim/action_delegator/grantee_delegations.rb', line 6 def self.for(consultation, user) new(consultation, user).query end |
Instance Method Details
#query ⇒ Object
15 16 17 |
# File 'app/queries/decidim/action_delegator/grantee_delegations.rb', line 15 def query ConsultationDelegations.for(consultation).where(grantee_id: user.id) end |