Closed xnzac closed 11 years ago
I've added support via https://github.com/geokit/geokit-rails/commit/1d31634ef2aac2265e688e00dac098effef972e2 which also includes adding the test/gemspec lines to aid testers
Your 2nd commit reverting simplify sort_by_distance really is a separate issue that should be a separate pull request and we're really looking at removing that method anyway. Can you see any need for that method given the suggested alternative as specified in the file?
Regarding the 2nd commit, I had intended this to be a separate PR. Not sure what happened.
As I mentioned in the commit, I needed the 'distance' field for each result returned. This was the behaviour stretching back a few years, and also documented in README as of now:
Unless there's another method call that populates 'distance'?
Sorry the README is a bit out of date on that part.
I've pushed a new commit with a helper method and some tests and removes the Array sort_by_distance_from method alltogether.
See the tests for how you could use this https://github.com/geokit/geokit-rails/commit/f79bbdfb81d2a87c24c152cbfbf1638f2eacd878
Thanks - that looks good!
On 2013年9月24日Tuesday at 下午10:17, Michael Noack wrote:
Sorry the README is a bit out of date on that part. I've pushed a new commit with a helper method and some tests and removes the Array sort_by_distance_from method alltogether. See the tests for how you could use this f79bbdf (https://github.com/geokit/geokit-rails/commit/f79bbdfb81d2a87c24c152cbfbf1638f2eacd878)
— Reply to this email directly or view it on GitHub (https://github.com/geokit/geokit-rails/pull/38#issuecomment-25007752).
mysql2spatial adapter - https://github.com/dazuma/activerecord-mysql2spatial-adapter - is required by RGeo.
Copied geokit-rails' mysql2 adapter to mysql2adapter. No tests afraid, but working fine here.
As a side note, lots of duplication across the 3 mysql adapters. Might be worth extracting.