Permalink
Browse files

add a migrate class method and delegate to the new instance

  • Loading branch information...
1 parent 9d31acf commit d6af6fc0c03860f677e8fc85fa7eb4bab181215a @tenderlove tenderlove committed with fxn Aug 3, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 activerecord/lib/active_record/migration.rb
@@ -329,10 +329,13 @@ class << self
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

0 comments on commit d6af6fc

Please sign in to comment.