method

define_destroy_hook

Importance_0
v4.0.2 - Show latest stable - 0 notes - Class: HasAndBelongsToMany
define_destroy_hook() public

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 27
    def define_destroy_hook
      name = self.name
      model.send(:include, Module.new {
        class_eval           def destroy_associations            association(:#{name}).delete_all            super          end, __FILE__, __LINE__ + 1
      })
    end
Register or log in to add new notes.