Module: AlsoMigrate::Migration

Defined in:
lib/also_migrate/migration.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



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

def self.included(base)
  unless base.respond_to?(:method_missing_with_also_migrate)
    base.extend ClassMethods
    base.class_eval do
      class <<self
        alias_method :method_missing_without_also_migrate, :method_missing
        alias_method :method_missing, :method_missing_with_also_migrate
      end
    end
  end
end