Skip to content

Commit 4c98fc2

Browse files
Autolink references for AR::Calculations#async_* [ci-skip]
This also fixes several minor typos.
1 parent bf853ac commit 4c98fc2

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

activerecord/lib/active_record/relation/calculations.rb

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ def count(column_name = nil)
9393
end
9494
end
9595

96-
# Same as <tt>#count</tt> but perform the query asynchronously and returns an ActiveRecord::Promise.
96+
# Same as #count, but performs the query asynchronously and returns an
97+
# ActiveRecord::Promise.
9798
def async_count(column_name = nil)
9899
async.count(column_name)
99100
end
@@ -106,7 +107,8 @@ def average(column_name)
106107
calculate(:average, column_name)
107108
end
108109

109-
# Same as <tt>#average</tt> but perform the query asynchronously and returns an ActiveRecord::Promise.
110+
# Same as #average, but performs the query asynchronously and returns an
111+
# ActiveRecord::Promise.
110112
def async_average(column_name)
111113
async.average(column_name)
112114
end
@@ -120,7 +122,8 @@ def minimum(column_name)
120122
calculate(:minimum, column_name)
121123
end
122124

123-
# Same as <tt>#minimum</tt> but perform the query asynchronously and returns an ActiveRecord::Promise.
125+
# Same as #minimum, but performs the query asynchronously and returns an
126+
# ActiveRecord::Promise.
124127
def async_minimum(column_name)
125128
async.minimum(column_name)
126129
end
@@ -134,7 +137,8 @@ def maximum(column_name)
134137
calculate(:maximum, column_name)
135138
end
136139

137-
# Same as <tt>#maximum</tt> but perform the query asynchronously and returns an ActiveRecord::Promise.
140+
# Same as #maximum, but performs the query asynchronously and returns an
141+
# ActiveRecord::Promise.
138142
def async_maximum(column_name)
139143
async.maximum(column_name)
140144
end
@@ -152,7 +156,8 @@ def sum(initial_value_or_column = 0, &block)
152156
end
153157
end
154158

155-
# Same as <tt>#sum</tt> but perform the query asynchronously and returns an ActiveRecord::Promise.
159+
# Same as #sum, but performs the query asynchronously and returns an
160+
# ActiveRecord::Promise.
156161
def async_sum(identity_or_column = nil)
157162
async.sum(identity_or_column)
158163
end
@@ -287,7 +292,8 @@ def pluck(*column_names)
287292
end
288293
end
289294

290-
# Same as <tt>#pluck</tt> but perform the query asynchronously and returns an ActiveRecord::Promise.
295+
# Same as #pluck, but performs the query asynchronously and returns an
296+
# ActiveRecord::Promise.
291297
def async_pluck(*column_names)
292298
async.pluck(*column_names)
293299
end
@@ -315,7 +321,8 @@ def pick(*column_names)
315321
limit(1).pluck(*column_names).then(&:first)
316322
end
317323

318-
# Same as <tt>#pick</tt> but perform the query asynchronously and returns an ActiveRecord::Promise.
324+
# Same as #pick, but performs the query asynchronously and returns an
325+
# ActiveRecord::Promise.
319326
def async_pick(*column_names)
320327
async.pick(*column_names)
321328
end
@@ -358,7 +365,8 @@ def ids
358365
result.then { |result| type_cast_pluck_values(result, columns) }
359366
end
360367

361-
# Same as <tt>#ids</tt> but perform the query asynchronously and returns an ActiveRecord::Promise.
368+
# Same as #ids, but performs the query asynchronously and returns an
369+
# ActiveRecord::Promise.
362370
def async_ids
363371
async.ids
364372
end

0 commit comments

Comments
 (0)