Sha256: ebf71ca9c07e3a2d6aefc7dcf31520fd658d5b4afa4926998d9087a8551908b5

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

            <fieldset class="module aligned">
              <% belongs_to_keys = @abstract_model.belongs_to_associations.map{|b| b[:child_key].first} %>
              <% properties.reject{|property| [:id, :created_at, :created_on, :deleted_at, :updated_at, :updated_on, :deleted_on].include?(property[:name]) || belongs_to_keys.include?(property[:name])}.each do |property| %>
              <% property_name = property[:name] %>
              <% property_type = property[:type] %>
              <% errors_exist = !(@object.errors[property_name].nil? || @object.errors[property_name].empty?) %>
              <div class="<%= errors_exist ? "form-row errors" : "form-row" %>">
                <% if errors_exist %>
                <ul class="errorlist">
                  <% @object.errors[property_name].each do |error| %>
                  <li><%= error %></li>
                  <% end %>
                </ul>
                <% end %>
<%= partial(property_type.to_s, :property => property) -%>
              </div>
              <% end %>
            </fieldset>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
merb-admin-0.8.5 app/views/main/_properties.html.erb
merb-admin-0.8.3 app/views/main/_properties.html.erb