Sha256: 0c456b94324b1b80e7770fdb4f86faf2e70a7a65887f886700e1db1d6fcb7fee

Contents?: true

Size: 1.19 KB

Versions: 6

Compression:

Stored size: 1.19 KB

Contents

<table class="nostalgic">
  <thead>
    <tr>
      <td>
        <%= f.collection_select attr, collection, value_method, text_method, options, html_options %>
      </td>
      <td>
        <%= f.text_field "#{attr}_effective_at", class: 'datepicker', style: 'display: none;' %>
      </td>
      <td>
        <%= image_tag 'nostalgic/list.png', onclick: 'nostalgic.edit_nostalgic_attr(this); return false;' %>
      </td>
    </tr>
  </thead>
  <tbody style="display: none;">
    <% f.object.public_send(attr.to_s.pluralize).each_with_index do |nostalgic_attr, i| %>
      <%= f.fields_for "#{attr.to_s.pluralize}_attributes][#{i}]", nostalgic_attr do |f| %>
        <tr>
          <td>
            <%= f.hidden_field :id %>
            <%= f.hidden_field :_destroy %>
            <%= f.collection_select :value, collection, value_method, text_method, options, html_options.merge(disabled: true, readonly: true) %>
          </td>
          <td>
            <%= content_tag(:span, f.object.effective_at) %>
          </td>
          <td>
            <%= image_tag 'nostalgic/minus.png', onclick: 'nostalgic.remove_row(this); return false;' %>
          </td>
        </tr>
      <% end %>
    <% end %>
  </tbody>
</table>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nostalgic-0.6.4 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.6.3 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.6.2 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.6.1 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.6.0 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.5.2 app/views/nostalgic/_collection_select.html.erb