Hello-
I have two models (User and Locations). One user can have multiple
locations (home, office etc…) The location table has the lat and
lngs.
class User < ActiveRecord::Base
has_many :locations
acts_as_mappable :through => :locations
class Location < ActiveRecord::Base
belongs_to :user
acts_as_mappable
Now, when I do User.find_within(500. :origin => …), It fails with the
following error:
Mysql::Error: Unknown column ‘users.lat’ in ‘field
list’:
So, it seems that the :through relationship is not working. Can
someone pelase help me.
thanks
-John