Sha256: 42c5bc43fb4916513fb9cef31f5c821c4f2d8599196bc8885596c8dbf99a5e72
Contents?: true
Size: 969 Bytes
Versions: 31
Compression:
Stored size: 969 Bytes
Contents
# frozen_string_literal: true module Decidim module Elections module Admin # This class holds a form to perform an action on the BB. class ActionForm < Decidim::Form validates :pending_action, absence: true def main_button? true end def messages @messages ||= {} end def current_step @current_step ||= election.bb_status end def election @election ||= context[:election] end def pending_action return @pending_action if defined?(@pending_action) @pending_action = election.actions.pending.first end def bulletin_board @bulletin_board ||= context[:bulletin_board] || Decidim::Elections.bulletin_board end def refresh remove_instance_variable(:@pending_action) remove_instance_variable(:@current_step) end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems