Sha256: 3065363fed27a161632db0244d147e94865b5d7d4d9bc1f5318829073a13005c

Contents?: true

Size: 776 Bytes

Versions: 3

Compression:

Stored size: 776 Bytes

Contents

<h1>Results</h1>

<%- @survey_results.each do |result| %>
  <div>
    <h4><%= result.question.question_text %></h4>
    <p>
      <%- if result.results.is_a?(Array) %>
        <ol>
          <%- result.results.each do |answer| %>
            <li><%= answer %></li>
          <% end %>
        </ol>
      <% elsif result.results.is_a?(Hash) %>
        <table>
          <thead>
            <tr>
              <th>Option</th>
              <th>Count</th>
            </tr>
          </thead>
          <tbody>
            <%- result.results.each do |option, count| %>
              <tr>
                <td><%= option %></td>
                <td><%= count %></td>
              </tr>
            <% end %>
          </tbody>
        </table>
      <% end %>
  </div>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rapidfire-4.0.0 app/views/rapidfire/surveys/results.html.erb
rapidfire-3.1.0 app/views/rapidfire/surveys/results.html.erb
rapidfire-3.0.0 app/views/rapidfire/surveys/results.html.erb