aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/migration.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index 06a8747fde..9892c6c338 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -294,9 +294,6 @@ module ActiveRecord
cattr_accessor :verbose
- self.delegate = new
- self.verbose = true
-
attr_accessor :name, :version
def initialize
@@ -305,6 +302,10 @@ module ActiveRecord
@connection = nil
end
+ # instantiate the delegate object after initialize is defined
+ self.verbose = true
+ self.delegate = new
+
def up
self.class.delegate = self
return unless self.class.respond_to?(:up)