aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/treasure.rb
diff options
context:
space:
mode:
authorMike Breen <hardbap@gmail.com>2009-07-11 14:30:35 +0200
committerEloy Duran <eloy.de.enige@gmail.com>2009-09-12 15:37:54 +0200
commitbcd0ef710ec6d2cc6b880c39de0dfacc07df85e4 (patch)
tree9bce1073883ad4facad446b06f8d2cd53d224358 /activerecord/test/models/treasure.rb
parent3180619c0d228812c119e9704ac5956cbcad8614 (diff)
downloadrails-bcd0ef710ec6d2cc6b880c39de0dfacc07df85e4.tar.gz
rails-bcd0ef710ec6d2cc6b880c39de0dfacc07df85e4.tar.bz2
rails-bcd0ef710ec6d2cc6b880c39de0dfacc07df85e4.zip
Raise an exception with friendlier error message when attempting to build a polymorphic belongs_to with accepts_nested_attributes_for. [#2318 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
Diffstat (limited to 'activerecord/test/models/treasure.rb')
-rw-r--r--activerecord/test/models/treasure.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/treasure.rb b/activerecord/test/models/treasure.rb
index 97c690c110..2a98e74f2c 100644
--- a/activerecord/test/models/treasure.rb
+++ b/activerecord/test/models/treasure.rb
@@ -3,4 +3,6 @@ class Treasure < ActiveRecord::Base
belongs_to :looter, :polymorphic => true
has_many :price_estimates, :as => :estimate_of
+
+ accepts_nested_attributes_for :looter
end