Skip to content
Snippets Groups Projects
Commit 413e6a9c authored by Alex Reisner's avatar Alex Reisner
Browse files

Fix broken PostgreSQL compatibility.

Add a GROUP BY clause which yields correct SQL. (Incorrect query is
accepted by MySQL and SQLite but not PostgreSQL.)
parent 2b69ba59
No related branches found
No related tags found
No related merge requests found
......@@ -4,9 +4,10 @@ Per-release changes to Geocoder.
== 0.9.5 (TBA)
* Don't allow :conditions hash in 'options' argument to 'nearbys' method (was deprecated in 0.9.3).
* Separate Rails 2 and Rails 3-compatible branches.
* Fix broken PostgreSQL compatibility (now 100% compatible).
* Switch from Google's XML to JSON geocoding API.
* Separate Rails 2 and Rails 3-compatible branches.
* Don't allow :conditions hash in 'options' argument to 'nearbys' method (was deprecated in 0.9.3).
== 0.9.4 (2010 Aug 2)
......
......@@ -111,6 +111,7 @@ module Geocoder
["#{lat_attr} BETWEEN ? AND ? AND #{lon_attr} BETWEEN ? AND ?"] +
coordinate_bounds(latitude, longitude, radius)
{
:group => columns.map{ |c| c.name}.join(','),
:order => options[:order],
:limit => options[:limit],
:offset => options[:offset],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment