diff options
author | Andreas Neuhaus <zargony@zargony.com> | 2008-05-08 00:04:53 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-05-08 00:04:53 -0500 |
commit | bcb090c56b842a76397e0ea32f54c942fd11910e (patch) | |
tree | 2921e7b7b80559f1e20a335da021fdd308993eab /activerecord/lib | |
parent | 2561732a08ae97fa44706a8eca4db147c4a7c286 (diff) | |
download | rails-bcb090c56b842a76397e0ea32f54c942fd11910e.tar.gz rails-bcb090c56b842a76397e0ea32f54c942fd11910e.tar.bz2 rails-bcb090c56b842a76397e0ea32f54c942fd11910e.zip |
Calling ActiveRecord#inspect on an unloaded association won't wipe the collection [#9 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index c415ad2df3..68503a3c40 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -118,7 +118,7 @@ module ActiveRecord end def inspect - reload unless loaded? + load_target @target.inspect end @@ -167,7 +167,7 @@ module ActiveRecord def with_scope(*args, &block) @reflection.klass.send :with_scope, *args, &block end - + private def method_missing(method, *args) if load_target |