Sha256: de079d3be455486dffc0652e185b04a365d08fc83d378904dc00cbf210cedff7

Contents?: true

Size: 658 Bytes

Versions: 6

Compression:

Stored size: 658 Bytes

Contents

= div_for @section, :class => @section.custom_class do
  %span.title= @section.title
  - qs ||= []
  - (questions = @section.questions).each_with_index do |q, i|
    - if q.part_of_group?
      - qs << q # gather up the group questions
      - if (i+1 >= questions.size) or (q.question_group_id != questions[i+1].question_group_id)
        - # this is the last question of the section, or the group
        = render q.question_group.custom_renderer || "/partials/question_group", :g => q.question_group, :qs => qs, :f => f
        - qs = []
    - else # gather up the group questions
      = render q.custom_renderer || "/partials/question", :q => q, :f => f

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
surveyor-1.2.0 app/views/partials/_section.html.haml
surveyor-1.1.0 app/views/partials/_section.html.haml
surveyor-1.0.1 app/views/partials/_section.html.haml
surveyor-1.0.0 app/views/partials/_section.html.haml
surveyor-0.22.0 app/views/partials/_section.html.haml
surveyor-0.21.0 app/views/partials/_section.html.haml