Module: ActsAsArchive::Migration

Defined in:
lib/acts_as_archive/migration.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/acts_as_archive/migration.rb', line 4

def self.included(base)
  unless base.included_modules.include?(InstanceMethods)
    base.send :extend, ClassMethods
    base.class_eval do
      class <<self
        unless method_defined?(:method_missing_without_archive)
          alias_method :method_missing_without_archive, :method_missing
          alias_method :method_missing, :method_missing_with_archive
        end
      end
    end
  end
end