diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-07 13:30:51 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-07 13:30:51 -0800 |
commit | 4300f945330d885665c84f076182d9650a1a0867 (patch) | |
tree | 0e68f34eaa4cfd2c097dec10ace525f943bb5444 /activerecord | |
parent | 3022ce4f723075d201d9a20f7bca3537aa76a7d8 (diff) | |
download | rails-4300f945330d885665c84f076182d9650a1a0867.tar.gz rails-4300f945330d885665c84f076182d9650a1a0867.tar.bz2 rails-4300f945330d885665c84f076182d9650a1a0867.zip |
Revert "Remove connection method definition, since it's called just once."
Restore the connection method which was added so it can be overridden.
This reverts commit e428c75d2b67c6a7bd5f5e7e1719cdece84d497f.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 09a558a636..0022e8cc37 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -339,6 +339,10 @@ module ActiveRecord self.verbose = save end + def connection + ActiveRecord::Base.connection + end + def method_missing(method, *arguments, &block) arg_list = arguments.map(&:inspect) * ', ' @@ -346,7 +350,7 @@ module ActiveRecord unless arguments.empty? || method == :execute arguments[0] = Migrator.proper_table_name(arguments.first) end - Base.connection.send(method, *arguments, &block) + connection.send(method, *arguments, &block) end end end |