Module: Decidim::Consultations::NeedsQuestion::InstanceMethods
- Defined in:
- app/controllers/concerns/decidim/consultations/needs_question.rb
Instance Method Summary collapse
-
#current_consultation ⇒ Object
Public: Finds the current Consultation given this controller’s context.
-
#current_question ⇒ Object
(also: #current_participatory_space)
Public: Finds the current Question given this controller’s context.
Instance Method Details
#current_consultation ⇒ Object
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_question ⇒ Object 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 |