提交 8957f5db 编写于 作者: P Pratik Naik

Make Model.all just a wrapper for find(:all)

上级 d6d0fe8c
......@@ -669,16 +669,10 @@ def last(*args)
find(:last, *args)
end
# Returns an ActiveRecord::Relation object. You can pass in all the same arguments to this method as you can
# to find(:all).
# A convenience wrapper for <tt>find(:all, *args)</tt>. You can pass in all the
# same arguments to this method as you can to <tt>find(:all)</tt>.
def all(*args)
options = args.extract_options!
if options.empty? && !scoped?(:find)
arel_table.to_a
else
construct_finder_arel_with_includes(options).to_a
end
find(:all, *args)
end
# Executes a custom SQL query against your database and returns all the results. The results will
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册