Module: Archivist::Migration

Defined in:
lib/archivist/migration.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/archivist/migration.rb', line 3

def self.included(base)
  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