Sha256: f1803cb211cc963b1fcea343194f32d56c6d1942308b67e140303711479c48cb

Contents?: true

Size: 961 Bytes

Versions: 19

Compression:

Stored size: 961 Bytes

Contents

<%
parent_record = @record
associated = column.singular_association? ? [parent_record.send(column.name)].compact : parent_record.send(column.name).to_a
associated = associated.sort_by {|r| r.new_record? ? 99999999999 : r.id} unless column.association.options.has_key?(:order)
if show_blank_record = column.show_blank_record?(associated)
  associated << build_associated(column, parent_record)
end
subform_div_id = "#{sub_form_id({:association => column.name, :id => parent_record.id || 99999999999})}-div" 
-%>
<h5><%= column.label -%></h5>
<div id ="<%= subform_div_id %>" <%= 'style="display: none;"'.html_safe if column.collapsed -%>>
<%= render :partial => subform_partial_for_column(column), :locals => {:column => column, :parent_record => parent_record, :associated => associated, :show_blank_record => show_blank_record} %>
</div>
<%= link_to_visibility_toggle(subform_div_id, {:default_visible => !column.collapsed}) -%>
<% @record = parent_record -%>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
active_scaffold-3.2.1 frontends/default/views/_form_association.html.erb
active_scaffold-3.2.0 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.20 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.19 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.18 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.17 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.15 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.14 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.13 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.12 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.11 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.10 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.9 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.8 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.7 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.6 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.5 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.4 frontends/default/views/_form_association.html.erb
active_scaffold-3.1.3 frontends/default/views/_form_association.html.erb