Sha256: 21c5ea51aa9324d2196da966d996079f62097b5ccdc4ae122263767db9314ffd

Contents?: true

Size: 1.04 KB

Versions: 19

Compression:

Stored size: 1.04 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

19 entries across 19 versions & 1 rubygems

Version Path
merb-admin-0.8.8 app/views/main/_properties.html.erb
merb-admin-0.8.7 app/views/main/_properties.html.erb
merb-admin-0.8.6 app/views/main/_properties.html.erb
merb-admin-0.8.1 app/views/main/_properties.html.erb
merb-admin-0.8.0 app/views/main/_properties.html.erb
merb-admin-0.7.6 app/views/main/_properties.html.erb
merb-admin-0.7.5 app/views/main/_properties.html.erb
merb-admin-0.7.4 app/views/main/_properties.html.erb
merb-admin-0.7.3 app/views/main/_properties.html.erb
merb-admin-0.7.2 app/views/main/_properties.html.erb
merb-admin-0.7.1 app/views/main/_properties.html.erb
merb-admin-0.7.0 app/views/main/_properties.html.erb
merb-admin-0.6.9 app/views/main/_properties.html.erb
merb-admin-0.6.8 app/views/main/_properties.html.erb
merb-admin-0.6.7 app/views/main/_properties.html.erb
merb-admin-0.6.6 app/views/main/_properties.html.erb
merb-admin-0.6.5 app/views/main/_properties.html.erb
merb-admin-0.6.4 app/views/main/_properties.html.erb
merb-admin-0.6.3 app/views/main/_properties.html.erb