1 2 3 4
class PriceEstimate < ActiveRecord::Base belongs_to :estimate_of, :polymorphic => true belongs_to :thing, polymorphic: true end