Spree extension to provide a list of retail locations near a users' provided postal code
- Target Spree 2.4 in the first release
- Provide a means of geocoding any given ActiveRecord model based on address
- Supports a single geocoding provider
- Provides a facility for looking up a user-submitted location identifier (presumably a postal code) and returning a ActiveRecord result set of locations sorted by ascending distance from the supplied starting point
- Delegates to the
alexreisner/geocoderwhere possible to simplify(lat,lng)lookups - Targets PostgreSQL exclusively using the
earthdistanceaddon.- May support MySQL via its spatial extensions in a future release
- Provides a vendored copy of the jQuery Store Locator Plugin for optional frontend mapping needs
- Uses the
acts_as_listgem's DSL as a guideline for inclusion with a Spree model specified by the gem user
- Provide its own location / store AR model
- Support all versions of Spree
Add spree_locations_near_you to your Gemfile:
gem 'spree_locations_near_you'Bundle your dependencies and run the installation generator:
bundle
bundle exec rails g spree_locations_near_you:installFirst bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.
bundle
bundle exec rakeWhen testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:
require 'spree_locations_near_you/factories'52a513fa8d985d1757a1f1f982efafc09c83e49b