diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-03-01 14:36:32 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-03-01 14:36:32 -0300 |
commit | bc57930e09d20ee2cdc4b5aa7200b155ba755f22 (patch) | |
tree | 4df498de85a52d4bc07279362d586d23862d29f4 /activerecord/lib/active_record/core.rb | |
parent | f2c707a64ee8683ee7bc4f1bc0254afcaa0ff676 (diff) | |
parent | 08a748118377f22823e06315f57db16e1ce3a7c3 (diff) | |
download | rails-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.rb | 8 |
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 |