Skip to content

Commit

Permalink
[skip ci] Improve warn_on_records_fetched documentation
Browse files Browse the repository at this point in the history
- ‘dection’ -> ‘detection’

- ‘exceeds threshold’ -> ‘exceeds the threshold’

- Other minor improvements.
  • Loading branch information
jonatack committed Mar 27, 2015
1 parent a1671af commit fe6de0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions activerecord/lib/active_record/core.rb
Expand Up @@ -96,10 +96,10 @@ def self.configurations

##
# :singleton-method:
# Specify a threshold for the size of query result sets. If the
# number of records in the set exceeds threshold, a warning is
# logged. This should be used to identify queries which pull
# thousands of records, which may cause memory bloat.
# Specify a threshold for the size of query result sets. If the number of
# records in the set exceeds the threshold, a warning is logged. This can
# be used to identify queries which load thousands of records and
# potentially cause memory bloat.
mattr_accessor :warn_on_records_fetched_greater_than, instance_writer: false
self.warn_on_records_fetched_greater_than = nil

Expand Down
Expand Up @@ -5,9 +5,8 @@ module RecordFetchWarning
# `config.active_record.warn_on_records_fetched_greater_than` is
# set to an integer, if the number of records a query returns is
# greater than the value of `warn_on_records_fetched_greater_than`,
# a warning is logged. This allows for the dection of queries that
# return a large number of records, which could cause memory
# bloat.
# a warning is logged. This allows for the detection of queries that
# return a large number of records, which could cause memory bloat.
#
# In most cases, fetching large number of records can be performed
# efficiently using the ActiveRecord::Batches methods.
Expand Down

0 comments on commit fe6de0f

Please sign in to comment.