提交 c730ae9b 编写于 作者: Z Zachary Scott

Merge pull request #15756 from aditya-kapoor/add-api-doc-for-querying

[ci skip] add API doc for AR Group.
......@@ -19,7 +19,15 @@ module Calculations
#
# Person.group(:city).count
# # => { 'Rome' => 5, 'Paris' => 3 }
#
#
# If +count+ is used with +group+ for multiple columns, it returns a Hash whose
# keys are an array containing the individual values of each column and the value
# of each key would be the +count+.
#
# Article.group(:status, :category).count
# # => {["draft", "business"]=>10, ["draft", "technology"]=>4,
# ["published", "business"]=>0, ["published", "technology"]=>2}
#
# If +count+ is used with +select+, it will count the selected columns:
#
# Person.select(:age).count
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册