diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
3 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb index 51b90d3c64..d950181566 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb @@ -71,7 +71,7 @@ module ActiveRecord # also be used to "borrow" the connection to do database work unrelated # to any of the specific Active Records. def connection - if @active_connection_name && (conn = active_connections[@active_connection_name]) + if defined?(@active_connection_name) && (conn = active_connections[@active_connection_name]) conn else # retrieve_connection sets the cache key. diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index b8a6b19f04..48ff9de1cf 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -192,14 +192,14 @@ module ActiveRecord end def fallback_string_to_date(string) - new_date *ParseDate.parsedate(string)[0..2] + new_date(*ParseDate.parsedate(string)[0..2]) end def fallback_string_to_time(string) time_hash = Date._parse(string) time_hash[:sec_fraction] = microseconds(time_hash) - new_time *time_hash.values_at(:year, :mon, :mday, :hour, :min, :sec, :sec_fraction) + new_time(*time_hash.values_at(:year, :mon, :mday, :hour, :min, :sec, :sec_fraction)) end end diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 940707a9e9..e223baadbc 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -30,6 +30,7 @@ module ActiveRecord @connection, @logger = connection, logger @runtime = 0 @last_verification = 0 + @query_cache_enabled = false end # Returns the human-readable name of the adapter. Use mixed case - one |