Sha256: e8c68d5aaa56598257452257f0c81bcf6825a8346522c0d2172791feb677c9fc
Contents?: true
Size: 634 Bytes
Versions: 8
Compression:
Stored size: 634 Bytes
Contents
# frozen_string_literal: true module Decidim module ActionDelegator class VoteDelegation def initialize(response, context) @response = response @context = context end def call PaperTrail.request.controller_info = { decidim_action_delegator_delegation_id: context.delegation.id } WhodunnitVote.new(build_vote, context.current_user) end private attr_reader :context, :response def build_vote context.current_question.votes.build( author: context.delegation.granter, response: response ) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems