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

Document known issue with :includes option.

parent 7f58407e
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,16 @@ There are few options for finding objects near a given point in SQLite without i
Because Geocoder needs to provide this functionality as a scope, we must go with option #1, but feel free to implement #2 or #3 if you need more accuracy.
== Known Issue
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:
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.
== To-do List
* prevent NameError when GOOGLE_MAPS_API_KEY is missing: show nice msg
......
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