add a migrate class method and delegate to the new instance

This commit is contained in:
Aaron Patterson
2011-08-02 20:01:38 -07:00
parent 43fc814074
commit 3a29cc3412

View File

@@ -329,10 +329,13 @@ module ActiveRecord
end
def self.method_missing(name, *args, &block) # :nodoc:
self.delegate = self.new
(delegate || superclass.delegate).send(name, *args, &block)
end
def self.migrate(direction)
new.migrate direction
end
cattr_accessor :verbose
attr_accessor :name, :version