rails/activerecord/test/models/price_estimate.rb
Jon Leighton eb4a623d74 Fix nested association references
Previously the reflection would be looked up on the wrong class. However
the test passed because the examples referred back to themselves.
2012-09-12 23:32:50 +01:00

5 lines
132 B
Ruby

class PriceEstimate < ActiveRecord::Base
belongs_to :estimate_of, :polymorphic => true
belongs_to :thing, polymorphic: true
end