just call methods on return value of load_target

This commit is contained in:
Aaron Patterson
2011-01-12 14:26:57 -08:00
parent bc993c690b
commit e9980f17fd

View File

@@ -150,17 +150,12 @@ module ActiveRecord
# Forwards the call to the target. Loads the \target if needed.
def inspect
load_target
@target.inspect
load_target.inspect
end
def send(method, *args)
if respond_to?(method)
super
else
load_target
@target.send(method, *args)
end
return super if respond_to?(method)
load_target.send(method, *args)
end
def scoped