Sha256: c323c5b12386b6000b88e797b435fd0fc5ec82d728411e4eeed36080e2a5a8c9

Contents?: true

Size: 575 Bytes

Versions: 14

Compression:

Stored size: 575 Bytes

Contents

<div id="error_explanation">

  <% vars = controller.instance_variable_names.select { |var| eval(var).is_a?(ActiveRecord::Base) && eval(var).errors.is_a?(ActiveModel::Errors)} %>
  <% if vars.sum { |v| eval(v).errors.count } > 0 %>
    <h2><%=pluralize(vars.sum { |v| eval(v).errors.count }, "error") %> prohibited this form from being saved:</h2>
    <ul> 
      <% vars.each do |var| %>
        <% eval(var).errors.full_messages.each do |msg| %>
          <li><%= eval(var).class.name + ": " + msg %></li>
        <% end %> 
      <% end %>   
  </ul> 
  <% end %>
</div>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
acts_as_multipart_form-0.0.16 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.15 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.14 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.13 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.12 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.11 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.10 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.9 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.8 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.7 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.6 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.5 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.4 app/views/multipart_form/_all_errors.html.erb
acts_as_multipart_form-0.0.3 app/views/multipart_form/_all_errors.html.erb