Sha256: b832828215498ef9dd3d28a2c77474e6cfc5c468a13fc56c4198c045fdfca38e

Contents?: true

Size: 585 Bytes

Versions: 4

Compression:

Stored size: 585 Bytes

Contents

<% f.object.send(fk).each_with_index do |ar, idx|  %>
  <div class="control-group">
    <%= f.fields_for fk do |ar_form| %>
    <div class="controls">
      <!-- do some stuff to see if this type has a specific view partial -->
      <% if File.file?(File.expand_path("_#{ar.type.to_s.downcase}_form.html.erb", File.dirname(__FILE__))) %>
        <%= render :partial => "#{ar.type.to_s.downcase}_form", :locals => {f: f, fk: fk} %>
      <% else %>
        <%= ar_form.text_field  "",  :class => 'text_field', :value => ar %>
      <% end %>
    </div>
    <% end %>
  </div>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
common-content-0.0.4 app/views/contents/_array_form.html.erb
common-content-0.0.3 app/views/contents/_array_form.html.erb
common-content-0.0.2 app/views/contents/_array_form.html.erb
common-content-0.0.1 app/views/contents/_array_form.html.erb