diff options
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 91da7dec4d..e32519537b 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -25,8 +25,7 @@ module ActiveRecord end def respond_to?(symbol, include_priv = false) - load_target - proxy_respond_to?(symbol, include_priv) || @target.respond_to?(symbol, include_priv) + proxy_respond_to?(symbol, include_priv) || (load_target && @target.respond_to?(symbol, include_priv)) end def loaded? |