aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-12-28 12:50:56 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-12-28 12:50:56 -0800
commit9fe42232f14eb44f06c655e87b54ff30cee0fe44 (patch)
tree2a9fa606752099a0f1cc9a27f77d08d9a0a634a0 /activerecord/lib/active_record/associations.rb
parenta76af2309ac362ae1f38d24fd4746139deca3417 (diff)
parentc23fbd0d475612fe9cd493bd08c8da2f8d7e6f03 (diff)
downloadrails-9fe42232f14eb44f06c655e87b54ff30cee0fe44.tar.gz
rails-9fe42232f14eb44f06c655e87b54ff30cee0fe44.tar.bz2
rails-9fe42232f14eb44f06c655e87b54ff30cee0fe44.zip
Merge commit 'Fingertips/master'
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 7242ebf387..0b248a6c55 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -3,8 +3,8 @@ require 'active_support/core_ext/enumerable'
module ActiveRecord
class InverseOfAssociationNotFoundError < ActiveRecordError #:nodoc:
- def initialize(reflection)
- super("Could not find the inverse association for #{reflection.name} (#{reflection.options[:inverse_of].inspect} in #{reflection.class_name})")
+ def initialize(reflection, associated_class = nil)
+ super("Could not find the inverse association for #{reflection.name} (#{reflection.options[:inverse_of].inspect} in #{associated_class.nil? ? reflection.class_name : associated_class.name})")
end
end