1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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 e428c75d2b.
This commit is contained in:
Jeremy Kemper 2010-01-07 13:30:51 -08:00
parent 3022ce4f72
commit 4300f94533

View file

@ -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