diff --git a/README.rdoc b/README.rdoc index 5626452192db9fea99b4ebf6a20ff490c95a7c1b..6da14dd671bc65c7ec45f307951aaaf89a854a64 100644 --- a/README.rdoc +++ b/README.rdoc @@ -123,7 +123,7 @@ Please see the code for more methods and detailed information about arguments (e == SQLite -SQLite's lack of trigonometric functions means Geocoder's default implementation of the +near+ method (scope) does not work. When using SQLite, Geocoder will automatically use a less accurate algorithm for finding objects near a given point. Results of this algorithm should not be trusted too much as it will return objects that are outside the given radius. +SQLite's lack of trigonometric functions requires an alternate implementation of the +near+ method (scope). When using SQLite, Geocoder will automatically use a less accurate algorithm for finding objects near a given point. Results of this algorithm should not be trusted too much as it will return objects that are outside the given radius. === Discussion @@ -143,7 +143,7 @@ Because Geocoder needs to provide this functionality as a scope, we must go with You cannot use the +near+ scope with another scope that provides an +includes+ option because the +SELECT+ clause generated by +near+ will overwrite it (or vice versa). Instead, try using +joins+ and pass a <tt>:select</tt> option to the +near+ scope to get the columns you want. For example, in Rails 2 syntax: - # instead of a simple :includes => :venues: + # instead of :includes => :venues: City.near("Omaha, NE", 20, :select => "venues.*").all(:joins => :venues) If anyone has a more elegant solution to this problem I am very interested in seeing it.