ActsAsLocateable released 10

Posted by Jeff Sat, 30 Dec 2006 01:54:00 GMT

Introducing my 2nd adventure into Rails plugins: ActsAsLocateable!

ActsAsLocateable is an easy way to give any model the ability to be found by location. For instance, say you have a model Store which is associated with a zip code indicating where that Store is located. To find all the stores within a specific radius of another ZipCode, you can do a

Store.find_within_radius(10, 12345)     # Find all stores within 10 miles of zip code 12345

Install ActsAsLocateable in the normal way

script/plugin install http://svn.baconbear.com/rails_plugins/acts_as_locateable/trunk/

Be sure to read the associated README file after the install for details on installation, setup, and usage.

ActsAsLocateable is based heavily on the ZipCodeSearch plugin by Doug Fales and utilizes much of the same code and data. Special thanks to Doug for making his code freely available!