場所には、「geokit-rails」で使用するための :lat と :lng があります Rails 4 を実行しています。
指定された場所の範囲にあるトラックを持つ個別のコレクションに対してクエリを実行することは可能ですか?
class Location < ActiveRecord::Base
belongs_to :locatable, polymorphic: true
acts_as_mappable
end
class Tracks < ActiveRecord::Base
has_one :location, as: :locatable
belongs_to :collection
end
class Collection < ActiveRecord::Base
belongs_to :user
has_many :tracks
end