aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/core.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-03-01 14:36:32 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-03-01 14:36:32 -0300
commitbc57930e09d20ee2cdc4b5aa7200b155ba755f22 (patch)
tree4df498de85a52d4bc07279362d586d23862d29f4 /activerecord/lib/active_record/core.rb
parentf2c707a64ee8683ee7bc4f1bc0254afcaa0ff676 (diff)
parent08a748118377f22823e06315f57db16e1ce3a7c3 (diff)
downloadrails-bc57930e09d20ee2cdc4b5aa7200b155ba755f22.tar.gz
rails-bc57930e09d20ee2cdc4b5aa7200b155ba755f22.tar.bz2
rails-bc57930e09d20ee2cdc4b5aa7200b155ba755f22.zip
Merge pull request #23417 from sgringwe/master
Add option to error on ignored order or limit
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r--activerecord/lib/active_record/core.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 24fd0aaecf..86ec8000fb 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -72,6 +72,14 @@ module ActiveRecord
##
# :singleton-method:
+ # Specifies if an error should be raised on query limit or order being
+ # ignored when doing batch queries. Useful in applications where the
+ # limit or scope being ignored is error-worthy, rather than a warning.
+ mattr_accessor :error_on_ignored_order_or_limit, instance_writer: false
+ self.error_on_ignored_order_or_limit = false
+
+ ##
+ # :singleton-method:
# Specify whether or not to use timestamps for migration versions
mattr_accessor :timestamped_migrations, instance_writer: false
self.timestamped_migrations = true