From cbda51e87b949f48cf04d947dc4cbb8969e46f4d Mon Sep 17 00:00:00 2001
From: matchu <matchu1993@gmail.com>
Date: Fri, 26 Nov 2010 06:01:25 -0800
Subject: [PATCH] include table name in GROUP BY on nearby scope so as not to
mess up my joins
---
lib/geocoder.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/geocoder.rb b/lib/geocoder.rb
index 8c34517f..f1a5099f 100644
--- a/lib/geocoder.rb
+++ b/lib/geocoder.rb
@@ -115,7 +115,7 @@ module Geocoder
conditions << obj.id
end
{
- :group => columns.map{ |c| c.name}.join(','),
+ :group => columns.map{ |c| "#{table_name}.#{c.name}" }.join(','),
:order => options[:order],
:limit => options[:limit],
:offset => options[:offset],
--
GitLab