Skip to content

Commit 6ebe6f3

Browse files
Do not self-link ActiveRecord::Calculations#count [ci-skip]
1 parent 603cb64 commit 6ebe6f3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

activerecord/lib/active_record/relation/calculations.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,26 @@ def truncate(name)
6060
# Person.distinct.count(:age)
6161
# # => counts the number of different age values
6262
#
63-
# If #count is used with {Relation#group}[rdoc-ref:QueryMethods#group],
63+
# If +count+ is used with {Relation#group}[rdoc-ref:QueryMethods#group],
6464
# it returns a Hash whose keys represent the aggregated column,
6565
# and the values are the respective amounts:
6666
#
6767
# Person.group(:city).count
6868
# # => { 'Rome' => 5, 'Paris' => 3 }
6969
#
70-
# If #count is used with {Relation#group}[rdoc-ref:QueryMethods#group] for multiple columns, it returns a Hash whose
70+
# If +count+ is used with {Relation#group}[rdoc-ref:QueryMethods#group] for multiple columns, it returns a Hash whose
7171
# keys are an array containing the individual values of each column and the value
72-
# of each key would be the #count.
72+
# of each key would be the count.
7373
#
7474
# Article.group(:status, :category).count
7575
# # => {["draft", "business"]=>10, ["draft", "technology"]=>4, ["published", "technology"]=>2}
7676
#
77-
# If #count is used with {Relation#select}[rdoc-ref:QueryMethods#select], it will count the selected columns:
77+
# If +count+ is used with {Relation#select}[rdoc-ref:QueryMethods#select], it will count the selected columns:
7878
#
7979
# Person.select(:age).count
8080
# # => counts the number of different age values
8181
#
82-
# Note: not all valid {Relation#select}[rdoc-ref:QueryMethods#select] expressions are valid #count expressions. The specifics differ
82+
# Note: not all valid {Relation#select}[rdoc-ref:QueryMethods#select] expressions are valid +count+ expressions. The specifics differ
8383
# between databases. In invalid cases, an error from the database is thrown.
8484
#
8585
# When given a block, loads all records in the relation, if the relation

0 commit comments

Comments
 (0)