aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorMurray Steele <muz@h-lame.com>2009-12-28 14:13:33 +0100
committerEloy Duran <eloy.de.enige@gmail.com>2009-12-28 15:12:17 +0100
commitff508640e28914da2b546f6a8c9f215bab201b61 (patch)
treeae952ef0dad923d9e7b3e5b36e2d74ba9f20867b /activerecord/test/models
parent6a74ee7f4deea4a44520d3fcc9120e0bb848823f (diff)
downloadrails-ff508640e28914da2b546f6a8c9f215bab201b61.tar.gz
rails-ff508640e28914da2b546f6a8c9f215bab201b61.tar.bz2
rails-ff508640e28914da2b546f6a8c9f215bab201b61.zip
Make polymorphic_inverse_of in Reflection throw an InverseOfAssociationNotFoundError if the supplied class doesn't have the appropriate association. [#3520 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/face.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/models/face.rb b/activerecord/test/models/face.rb
index 3e2bdc0307..edb75d333f 100644
--- a/activerecord/test/models/face.rb
+++ b/activerecord/test/models/face.rb
@@ -1,6 +1,7 @@
class Face < ActiveRecord::Base
belongs_to :man, :inverse_of => :face
belongs_to :polymorphic_man, :polymorphic => true, :inverse_of => :polymorphic_face
- # This is a "broken" inverse_of for the purposes of testing
+ # These is a "broken" inverse_of for the purposes of testing
belongs_to :horrible_man, :class_name => 'Man', :inverse_of => :horrible_face
+ belongs_to :horrible_polymorphic_man, :polymorphic => true, :inverse_of => :horrible_polymorphic_face
end