Class: Decidim::Forms::QuestionReadonlyCell

Inherits:
ViewModel
  • Object
show all
Defined in:
app/cells/decidim/forms/question_readonly_cell.rb

Overview

This cell renders a question (readonly) of a questionnaire

Instance Method Summary collapse

Instance Method Details

#positionObject



14
15
16
# File 'app/cells/decidim/forms/question_readonly_cell.rb', line 14

def position
  options[:indexed_items].index(model.id) + 1
end

#showObject



7
8
9
10
11
12
# File 'app/cells/decidim/forms/question_readonly_cell.rb', line 7

def show
  return if model.separator?
  return render :title_and_description if model.title_and_description?

  render :show
end