Flowdock
method

define_destroy_hook

Importance_0
v3.2.13 - Show latest stable - 0 notes - Class: HasAndBelongsToMany
define_destroy_hook() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb, line 16
      def define_destroy_hook
        name = self.name
        model.send(:include, Module.new {
          class_eval             def destroy_associations              association(#{name.to_sym.inspect}).delete_all_on_destroy              super            end, __FILE__, __LINE__ + 1
        })
      end
Register or log in to add new notes.