Class: Decidim::ActionDelegator::VoteDelegation

Inherits:
Object
  • Object
show all
Defined in:
app/commands/decidim/action_delegator/vote_delegation.rb

Instance Method Summary collapse

Constructor Details

#initialize(response, context) ⇒ VoteDelegation

Returns a new instance of VoteDelegation.



6
7
8
9
# File 'app/commands/decidim/action_delegator/vote_delegation.rb', line 6

def initialize(response, context)
  @response = response
  @context = context
end

Instance Method Details

#callObject



11
12
13
14
# File 'app/commands/decidim/action_delegator/vote_delegation.rb', line 11

def call
  PaperTrail.request.controller_info = { decidim_action_delegator_delegation_id: context.delegation.id }
  WhodunnitVote.new(build_vote, context.current_user)
end