geokit / geokit-rails

Official Geokit plugin for Rails/ActiveRecord. Provides location-based goodness for your Rails app. Requires the Geokit gem.
MIT License
1.57k stars 245 forks source link

Fix ActiveRecord all deprecation by replacing it with to_a #41

Closed nneal closed 11 years ago

nneal commented 11 years ago

Since all is deprecated in Rails 4, I used to_a instead. Asserting equality of locations.to_a.size and locations.count feels a bit redundant though. What do you think about removing the to_a.size checks?

Also -- tests are passing (and others aren't throwing warnings) once we stop using this deprecated method

My other commit removes a test of sort_by_distance_from because that method is deprecated in Rails 4.

nneal commented 11 years ago

Looks like the build failed because we have testing enabled for 1.8.7 and Rails 4.

https://travis-ci.org/geokit/geokit-rails/builds/10777610