Module: Decidim::Consultations::NeedsQuestion::InstanceMethods

Defined in:
app/controllers/concerns/decidim/consultations/needs_question.rb

Instance Method Summary collapse

Instance Method Details

#current_consultationObject

Public: Finds the current Consultation given this controller’s context.

Returns the current Consultation.



44
45
46
# File 'app/controllers/concerns/decidim/consultations/needs_question.rb', line 44

def current_consultation
  @current_consultation ||= current_question&.consultation || detect_consultation
end

#current_questionObject Also known as: current_participatory_space

Public: Finds the current Question given this controller’s context.

Returns the current Question.



36
37
38
# File 'app/controllers/concerns/decidim/consultations/needs_question.rb', line 36

def current_question
  @current_question ||= detect_question
end