Module: Decidim::AnonymousProposals::UpdateProposalCommandOverrides

Extended by:
ActiveSupport::Concern
Defined in:
app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb

Overview

Method overrides to avoid errors when current_user is not present

Instance Method Summary collapse

Instance Method Details

#initialize(form, current_user, proposal) ⇒ Object



9
10
11
12
13
14
15
# File 'app/commands/decidim/anonymous_proposals/update_proposal_command_overrides.rb', line 9

def initialize(form, current_user, proposal)
  @form = form
  @current_user = current_user
  @current_user ||= anonymous_group if allow_anonymous_proposals?
  @proposal = proposal
  @attached_to = proposal
end