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

Minor cleanup to README.

parent cfa8af59
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
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