Browse files

adding visitors to the respective adapters

  • Loading branch information...
1 parent bd2f5c0 commit 24fa524cefb64208c424bda9e2fd80a9e4199629 @tenderlove tenderlove committed Nov 19, 2011
View
1 activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -127,6 +127,7 @@ def initialize(connection, logger, connection_options, config)
super(connection, logger)
@connection_options, @config = connection_options, config
@quoted_column_names, @quoted_table_names = {}, {}
+ @visitor = Arel::Visitors::MySQL.new self
end
def self.visitor_for(pool) # :nodoc:
View
1 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -307,6 +307,7 @@ def connection_active?
def initialize(connection, logger, connection_parameters, config)
super(connection, logger)
@connection_parameters, @config = connection_parameters, config
+ @visitor = Arel::Visitors::PostgreSQL.new self
# @local_tz is initialized as nil to avoid warnings when connect tries to use it
@local_tz = nil

0 comments on commit 24fa524

Please sign in to comment.