Sha256: 994f17c4be8e9935209f1462ef59a6cd5342afa99f593db1c70b0550da1d8884

Contents?: true

Size: 1.35 KB

Versions: 40

Compression:

Stored size: 1.35 KB

Contents

<table cellpadding="0" cellspacing="0">
  <%
    if associated.empty?
      @record = if column.singular_association?
        parent_record.send("build_#{column.name}".to_sym)
      else
        parent_record.send(column.name).build
      end
    else
      @record = associated.last
    end
  -%>
  <%= render :partial => 'horizontal_subform_header', :locals => {:parent_record => parent_record} %>

  <tbody id="<%= sub_form_list_id(:association => column.name) %>">
    <% associated.each_index do |index| %>
    <% @record = associated[index] -%>
    <% if @record.errors.count -%>
    <tr class="association-record-errors">
      <td colspan="<%= active_scaffold_config_for(@record.class).subform.columns.length + 1 %>" id="<%= element_messages_id :action => @record.class.name.underscore, :id => "#{parent_record.id}-#{index}" %>">
        <%= active_scaffold_error_messages_for :record, :object_name => @record.class.model_name.human.downcase %>
      </td>
    </tr>
    <% end %>
    <%= render :partial => 'horizontal_subform_record', :locals => {:scope => column_scope(column), :parent_record => parent_record, :column => column, :locked => @record.new_record? && @record == associated.last} %>
    <% end -%>
  </tbody>
</table>
<%= render :partial => 'form_association_footer', :locals => {:parent_record => parent_record, :column => column, :associated => associated} -%>

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
active_scaffold_vho-4.0.0 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.14 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.13 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.12 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.11 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.10 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.9 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.8 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.7 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.6 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.5 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.4 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.3 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.2 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.1 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.2.0 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.0.31 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.1.8 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.0.30 frontends/default/views/_horizontal_subform.html.erb
active_scaffold_vho-3.0.29 frontends/default/views/_horizontal_subform.html.erb