Delete view, too many related records #1548

sergiocampama opened this Issue Mar 4, 2013 · 5 comments


None yet

4 participants



I have a model that has_many lots of child records. When clicking on the "x" cross to delete one of these parent records, the request to confirm the deletion can take forever and actually timeout if the child records are too many.

Is there a way to not display the "The following related items may be deleted or orphaned" warning and only load the object that I'm trying to delete?


Second this. I patched it in by copying app/views/rails_admin/main/delete.html.haml and wrapping the relevant warning with a clause:

- unless @abstract_model.config.no_associated_warning
  = t("admin.form.all_of_the_following_related_items_will_be_deleted")
  %ul= render :partial => "delete_notice", :object => @object

then adding a flag to the model in my rails_admin.rb

RailsAdmin::Config::Model.class_eval do
  register_instance_option :no_associated_warning do

Then I can turn on :no_associated_warning in any model as needed.


Hey aghull, can you tell me a little more about turning on :no_associated_warning in any model as needed. Thanks


was a long time ago but looking at the code it was a custom attribute i made that the templates could use to silence that warning


I see, I got it to work by removing rending of the child nodes. thanks


Fixed by #2491.

@mshibuya mshibuya closed this Sep 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment