Sha256: 285cbe8a1d3de49b44e01566dc10dd6e7c6bd33ca71ffa84d071200ad1ca143d

Contents?: true

Size: 1.66 KB

Versions: 2

Compression:

Stored size: 1.66 KB

Contents

        <p>Are you sure you want to delete the <%= @abstract_model.pretty_name.downcase %> &ldquo;<%= object_label(@object) %>&rdquo;? All of the following related items will be deleted:</p>
        <ul>
          <li>
            <%= @abstract_model.pretty_name %>: <%= link_to(object_label(@object), url(:merb_admin_edit, :model_name => @abstract_model.singular_name, :id => @object.id)) %>
            <ul>
              <% @abstract_model.has_many_associations.each do |association| %>
              <% @object.send(association[:name]).reject{|child| child.nil?}.each do |child| %>
              <li>
                One or more <%= @abstract_model.pretty_name.pluralize.downcase %> in <%= association[:pretty_name].downcase %>: <%= link_to(object_label(child), url(:merb_admin_edit, :model_name => association[:name].to_s.singularize.to_sym, :id => child.id)) %>
              </li>
              <% end %>
              <% end %>
              <% @abstract_model.has_one_associations.each do |association| %>
              <% child = @object.send(association[:name]) %>
              <% next if child.nil? %>
              <li>
                A <%= @abstract_model.pretty_name.downcase %> in <%= association[:pretty_name].downcase %>: <%= link_to(object_label(child), url(:merb_admin_edit, :model_name => association[:name], :id => child.id)) %>
              </li>
              <% end %>
            </ul>
          </li>
        </ul>
        <%= form_for(@object, :action => url(:merb_admin_destroy, :model_name => @abstract_model.singular_name, :id => @object.id), :method => :delete) do %>
          <div>
            <%= submit "Yes, I'm sure" %>
          </div>
        <% end =%>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
merb-admin-0.6.6 app/views/main/delete.html.erb
merb-admin-0.6.5 app/views/main/delete.html.erb