rake

How can I override a method in a ConnectionAdapter class in Rails 3 for use in a rake task?

In order to override the table_exists? method in the Rails PostgreSQL adapter I have tried the following in an initializer file: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do def table_exists?(name) raise 'got here' end end This will raise the the following error: uninitialized constant ActiveRecord::Conne...