Sha256: 049abf32fa61ce37663333568f33dfed29b74ce817899a2c3025dc1883ab92bd

Contents?: true

Size: 685 Bytes

Versions: 7

Compression:

Stored size: 685 Bytes

Contents

= div_for @section, :class => @section.custom_class do
  %span.title= @section.translation(I18n.locale)[: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

7 entries across 7 versions & 4 rubygems

Version Path
upgrade_surveyor-1.4.2 app/views/partials/_section.html.haml
affectiva-surveyor-1.5.0.pre.disco.2 app/views/partials/_section.html.haml
hssc_surveyor-1.4.3.pre app/views/partials/_section.html.haml
hssc_surveyor-1.4.2.pre app/views/partials/_section.html.haml
hssc_surveyor-1.4.1.pre app/views/partials/_section.html.haml
surveyor-1.4.0 app/views/partials/_section.html.haml
surveyor-1.3.0 app/views/partials/_section.html.haml