From bcd0ef710ec6d2cc6b880c39de0dfacc07df85e4 Mon Sep 17 00:00:00 2001 From: Mike Breen Date: Sat, 11 Jul 2009 14:30:35 +0200 Subject: 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 --- activerecord/test/models/treasure.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/models/treasure.rb') 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 -- cgit v1.2.3