aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-19 10:13:56 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-19 10:14:13 -0800
commit9280fbf795d26146fe149514a32e22612b0311ee (patch)
treea17518b93909d7f9c5bb023f66f40b8252718053 /activerecord/lib/active_record/migration.rb
parentdeff5289474d966bb12ae18c1b816df3eeb11f27 (diff)
downloadrails-9280fbf795d26146fe149514a32e22612b0311ee.tar.gz
rails-9280fbf795d26146fe149514a32e22612b0311ee.tar.bz2
rails-9280fbf795d26146fe149514a32e22612b0311ee.zip
instantiate the delegate object after initialize is defined so that our initialize method actually gets called
Diffstat (limited to 'activerecord/lib/active_record/migration.rb')
-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)