aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-08-02 20:01:38 -0700
committerXavier Noria <fxn@hashref.com>2011-08-13 16:22:27 -0700
commitd6af6fc0c03860f677e8fc85fa7eb4bab181215a (patch)
tree475ae9022398ba70833eb643e6de7591c40baa95 /activerecord
parent9d31acf8b9e8c106f5cac2348a55de0f553458c1 (diff)
downloadrails-d6af6fc0c03860f677e8fc85fa7eb4bab181215a.tar.gz
rails-d6af6fc0c03860f677e8fc85fa7eb4bab181215a.tar.bz2
rails-d6af6fc0c03860f677e8fc85fa7eb4bab181215a.zip
add a migrate class method and delegate to the new instance
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/migration.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index 9307d7ef24..fa1b303fc7 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -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