views:

13

answers:

0

I have two models Store (with lat, lng columns) and Coupon.

Store has many coupons, as => couponables

Coupon belongs to couponable, :polymorphic => true (it's necessary for coupons association to be polymorphic for other use cases).

Is it possible to do geo queries for coupons around a zipcode through the Store model by declaring the following in Coupon model?

acts_as_mappable :through => Store

I tried but it isn't working. ANy other way to accomplish this?

Thanks