From 9731c862ecb827b16213c5bdb0f2bebbfaf9d608 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 5 Jan 2011 13:50:08 -0800 Subject: AR internals expect a normal hash, otherwise there are serialization incompatibilities --- activerecord/lib/active_record/result.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/result.rb') diff --git a/activerecord/lib/active_record/result.rb b/activerecord/lib/active_record/result.rb index 8deff1478f..47a5ac2700 100644 --- a/activerecord/lib/active_record/result.rb +++ b/activerecord/lib/active_record/result.rb @@ -23,7 +23,7 @@ module ActiveRecord private def hash_rows @hash_rows ||= @rows.map { |row| - ActiveSupport::OrderedHash[@columns.zip(row)] + Hash[@columns.zip(row)] } end end -- cgit v1.2.3 From 59f7780a3454a14054d1d33d9b6e31192ab2e58b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 4 Feb 2011 18:08:31 -0800 Subject: adjust query counts to be consistent across databases, make sure database log the same things --- activerecord/lib/active_record/result.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/result.rb') diff --git a/activerecord/lib/active_record/result.rb b/activerecord/lib/active_record/result.rb index 47a5ac2700..0465b21e88 100644 --- a/activerecord/lib/active_record/result.rb +++ b/activerecord/lib/active_record/result.rb @@ -20,6 +20,10 @@ module ActiveRecord hash_rows.each { |row| yield row } end + def to_hash + hash_rows + end + private def hash_rows @hash_rows ||= @rows.map { |row| -- cgit v1.2.3