Sha256: 43c9389b5fa8782bdcb5c51c9dd5e7c783e9b071c9f2293e05e7d82ebaa0239b
Contents?: true
Size: 726 Bytes
Versions: 4
Compression:
Stored size: 726 Bytes
Contents
# frozen_string_literal: true module Decidim module ActionDelegator module Consultations module QuestionMultipleVotesControllerOverride extend ActiveSupport::Concern included do helper_method :delegation before_action do session[:delegation_id] = params[:delegation] if params[:delegation] end private def delegation @delegation ||= Decidim::ActionDelegator::Delegation.find_by(id: delegation_id) end def delegation_id @delegation_id ||= params[:decidim_consultations_delegation_id] || params[:delegation] || session[:delegation_id] end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems