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

Validate acts_as_mappable options #97

Open koenpunt opened 8 years ago

koenpunt commented 8 years ago

Currently when using a non-existing unit (I used :km instead :kms), no errors are shown, but when I tried to query a distance, the resulting query was invalid due to missing a multiplier, which is looked up by its identifier.

This can be prevented if the options passed to acts_as_mappable would be validated in some kind of way.