This is an example from the geokit plugin which I am trying to
reproduce.
class Location < ActiveRecord::Base
belongs_to :locatable, :polymorphic => true
acts_as_mappable
end
class Company < ActiveRecord::Base
has_one :location, :as => :locatable # also works for belongs_to
associations
acts_as_mappable :through => :location
end
We see two separate models here. Now is there also a third model, like
some kind of join table? Also is there a locatable_id:integer and
locatable_type:string as well?