From fab80f00049f4eada324c4d11f6be7438869642d Mon Sep 17 00:00:00 2001 From: Alex Reisner <alex@alexreisner.com> Date: Mon, 21 Jun 2010 12:20:33 -0400 Subject: [PATCH] Minor cleanup to README. --- README.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index 56264521..6da14dd6 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. -- GitLab