Sha256: 3cc5c962ba0194c3b32958e029af8fccadb9430b24f2298bf145a098ffd6e6a1

Contents?: true

Size: 800 Bytes

Versions: 3

Compression:

Stored size: 800 Bytes

Contents

<% raise 'You must pass in an "answerer" to use this partial' unless defined?(answerer) %>

<% answerer.questions_by_section.each do |section, questions| %>
  <% unless section.nil? %>
    <h3><%= section.name %></h3>
    <p><%= section.instructions %></p>
  <% end %>
  <dl>
    <% questions.each do |question| %>
      <dt><%= question.name %></dt>
      <% answerer.answers_to(question).each do |answer| %>
        <dd>
          <% if answer.is_a?(Answer) && answer.question.supports_uploads? && !answer.uploaded_file.blank? %>
            <%= link_to asset_path(answer.uploaded_file_url), asset_path(answer.uploaded_file_url), target: "_blank" %>
          <% else %>
            <%= simple_format(answer.to_s) %>
          <% end %>
        </dd>
      <% end %>
    <% end %>
  </dl>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ask-0.5.4 app/views/answerer/_answers.html.erb
ask-0.5.3 app/views/answerer/_answers.html.erb
ask-0.5.2 app/views/answerer/_answers.html.erb