Module: DependentProtect

Defined in:
lib/dependent_protect.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

VERSION =
'0.0.6'

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/dependent_protect.rb', line 9

def self.included(base)
  super
  base.extend(ClassMethods)

  base.class_eval do
    class << self
      alias_method_chain :has_one, :protect
      alias_method_chain :has_many, :protect
      alias_method_chain :has_and_belongs_to_many, :protect
    end
  end
end