Class: Decidim::Proposals::Admin::ProposalAnswerForm

Inherits:
Form
  • Object
show all
Includes:
TranslatableAttributes
Defined in:
app/forms/decidim/proposals/admin/proposal_answer_form.rb

Overview

A form object to be used when admin users want to answer a proposal.

Instance Method Summary collapse

Instance Method Details

#costs_required?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'app/forms/decidim/proposals/admin/proposal_answer_form.rb', line 28

def costs_required?
  costs_enabled? && state == "accepted"
end

#publish_answer?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'app/forms/decidim/proposals/admin/proposal_answer_form.rb', line 32

def publish_answer?
  current_component.current_settings.publish_answers_immediately?
end