mirror of
https://github.com/github/rails.git
synced 2026-01-24 05:48:09 -05:00
Dont load the target before the proxy has had a chance to answer the respond_to? -- this would cause an .empty? query to trigger loading the entire collection if the proxy had already been initialized
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user