class ActiveAdmin::HasManyBuilder
def has_many_actions(form_builder, contents)
def has_many_actions(form_builder, contents) if form_builder.object.new_record? contents << template.content_tag(:li) do remove_text = remove_record.is_a?(String) ? remove_record : I18n.t("active_admin.has_many_remove") template.link_to remove_text, "#", class: "button has_many_remove" end elsif allow_destroy?(form_builder.object) form_builder.input( :_destroy, as: :boolean, wrapper_html: { class: "has_many_delete" }, label: I18n.t("active_admin.has_many_delete")) end if sortable_column form_builder.input sortable_column, as: :hidden contents << template.content_tag(:li, class: "handle") do I18n.t("active_admin.move") end end contents end