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