提交 d00f1c18 编写于 作者: A Aaron Patterson

select does not need a *args

上级 816ea74c
......@@ -29,12 +29,12 @@ def preload(*args)
relation
end
def select(*args)
def select(value = nil)
if block_given?
to_a.select {|*block_args| yield(*block_args) }
else
relation = clone
relation.select_values += args if args.present?
relation.select_values += [value] if value
relation
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册