Permalink
Browse files

Revert "Remove connection method definition, since it's called just o…

…nce."

Restore the connection method which was added so it can be overridden.

This reverts commit e428c75.
  • Loading branch information...
1 parent 3022ce4 commit 4300f945330d885665c84f076182d9650a1a0867 @jeremy jeremy committed Jan 7, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 activerecord/lib/active_record/migration.rb
@@ -339,14 +339,18 @@ def suppress_messages
self.verbose = save
end
+ def connection
+ ActiveRecord::Base.connection
+ end
+
def method_missing(method, *arguments, &block)
arg_list = arguments.map(&:inspect) * ', '
say_with_time "#{method}(#{arg_list})" do
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

0 comments on commit 4300f94

Please sign in to comment.