提交 47309826 编写于 作者: J Jon Leighton

load_target will return the target. it also will not load if loaded? is true.

上级 b7bcc7e1
......@@ -553,9 +553,8 @@ def first_or_last(type, *args)
if fetch_first_or_last_using_find?(args)
scoped.send(type, *args)
else
load_target unless loaded?
args.shift if args.first.kind_of?(Hash) && args.first.empty?
@target.send(type, *args)
load_target.send(type, *args)
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册