aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-09-12 23:32:50 +0100
committerJon Leighton <j@jonathanleighton.com>2012-09-12 23:32:50 +0100
commiteb4a623d74fe501ac73dc53d77cfca0d9d4ee01b (patch)
tree64e95beb96dc293aa3b5f277b05de58453f9e7cd /activerecord/test/models
parentb5aed34c442550c4caad1fdca12c921d5ab9840f (diff)
downloadrails-eb4a623d74fe501ac73dc53d77cfca0d9d4ee01b.tar.gz
rails-eb4a623d74fe501ac73dc53d77cfca0d9d4ee01b.tar.bz2
rails-eb4a623d74fe501ac73dc53d77cfca0d9d4ee01b.zip
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.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/price_estimate.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/price_estimate.rb b/activerecord/test/models/price_estimate.rb
index ef3bba36a9..d09e2a88a3 100644
--- a/activerecord/test/models/price_estimate.rb
+++ b/activerecord/test/models/price_estimate.rb
@@ -1,3 +1,4 @@
class PriceEstimate < ActiveRecord::Base
belongs_to :estimate_of, :polymorphic => true
+ belongs_to :thing, polymorphic: true
end