jimjh/genie-parser

View on GitHub
views/table.haml

Summary

Maintainability
Test Coverage
-# coding: UTF-8
.row
  .large-12.columns
    %table
      %thead
        -if headings
          %tr
            -headings.each do |heading|
              %th= heading

      %tbody
        -grid.each_with_index do |row, i|
          %tr
            -row.each_with_index do |cell, j|
              %td
                - if Spirit::Render::Table.input? cell
                  %input{name: "answer[#{i}][#{j}]", type: 'text'}
                - else
                  != cell
.row
  .large-2.small-1.columns
    %input.small.button.radius{type: 'submit', value: 'Submit'}