diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 1b929f28bd..f84a2a89b7 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -72,6 +72,10 @@ module ActiveRecord loaded end + def inspect + loaded? ? @target.inspect : "<#{@reflection.name} not loaded yet>" + end + protected def dependent? @reflection.options[:dependent] || false |