Class: ActionController::Base
- Extended by:
- ActiveSupport::Memoizable
- Defined in:
- lib/action_controller/base_patch.rb
Class Method Summary collapse
Class Method Details
.ajax_destroy ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/action_controller/base_patch.rb', line 42 def ajax_destroy if instance_methods.include?("resource") define_method :destroy do super do |format| format.js do render :update do |page| page.select(dom_id(resource)).remove() end end end end else raise t("dragoon_system.lack_necessary_method") end end |