diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-02 20:01:38 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-02 20:01:38 -0700 |
commit | 3a29cc341205b7da30c537f31eefb18ede51bb4d (patch) | |
tree | df815967e4faf6be03216cb05e23dbd244a2b4e2 /activerecord | |
parent | 43fc81407495a31465bc3559bc0703fd328f2308 (diff) | |
download | rails-3a29cc341205b7da30c537f31eefb18ede51bb4d.tar.gz rails-3a29cc341205b7da30c537f31eefb18ede51bb4d.tar.bz2 rails-3a29cc341205b7da30c537f31eefb18ede51bb4d.zip |
add a migrate class method and delegate to the new instance
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 5 |
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 |