Method: Bj::Table::ClassMethods#migration_class

Defined in:
lib/bj/table.rb

#migration_classObject



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/bj/table.rb', line 31

def migration_class
  table = self
  @migration_class ||=
    Class.new(ActiveRecord::Migration) do
      sc =
        class << self
          self
        end
      sc.module_eval{ attribute :table => table }
      sc.module_eval &table.migration
    end
end