Sha256: e729d52d2a3a7824e47c15917766cb6af77844de98a20a1961b2e0286fe43dd0

Contents?: true

Size: 1017 Bytes

Versions: 3

Compression:

Stored size: 1017 Bytes

Contents

            <fieldset class="module aligned">
              <% belongs_to_keys = @abstract_model.belongs_to_associations.map{|b| b[:child_key].first} %>
              <% properties.each do |property| %>
              <% property_name = property[:name] %>
              <% property_type = property[:type] %>
              <% next if [:id, :created_at, :created_on, :deleted_at, :updated_at, :updated_on, :deleted_on].include?(property_name) %>
              <% next if belongs_to_keys.include?(property_name) %>
              <div class="<%= @object.errors[property_name] ? "form-row errors" : "form-row" %>">
                <% if @object.errors[property_name] %>
                <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

3 entries across 3 versions & 1 rubygems

Version Path
merb-admin-0.5.4 app/views/main/_properties.html.erb
merb-admin-0.5.3 app/views/main/_properties.html.erb
merb-admin-0.5.2 app/views/main/_properties.html.erb