From e48b062eed430eea43ca94630310e9a7d663cf03 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 18 May 2007 02:11:43 +0000 Subject: Sanitize Base#inspect. Closes #8392. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/associations/association_proxy.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/association_proxy.rb') diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 010e4e396b..96cbd3043a 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -73,7 +73,8 @@ module ActiveRecord end def inspect - loaded? ? @target.inspect : "<#{@reflection.name} not loaded yet>" + reload unless loaded? + @target.inspect end protected -- cgit v1.2.3