diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-07-17 15:54:18 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-07-18 09:29:55 +0530 |
commit | 210012f615114544dc3bc05fdbfd477564357ae5 (patch) | |
tree | 02e4c89f191a97117b27ba2b4175daa791347f3f | |
parent | 9a1ab6674477642b72cc1760bb7dd69c9a5d6705 (diff) | |
download | rails-210012f615114544dc3bc05fdbfd477564357ae5.tar.gz rails-210012f615114544dc3bc05fdbfd477564357ae5.tar.bz2 rails-210012f615114544dc3bc05fdbfd477564357ae5.zip |
Remove mattr_accessor for deprecated config `error_on_ignored_order_or_limit`.
- It adds lot of warnings while running the tests. After https://github.com/rails/rails/commit/451437c6f57e66cc7586ec966e530493927098c7 it is not needed.
- Added reader method with deprecation warning for backward compatibility.
-rw-r--r-- | activerecord/lib/active_record/core.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 2c94463acd..c46cafdd09 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -78,7 +78,14 @@ module ActiveRecord mattr_accessor :error_on_ignored_order, instance_writer: false self.error_on_ignored_order = false - mattr_accessor :error_on_ignored_order_or_limit, instance_writer: false + def self.error_on_ignored_order_or_limit + ActiveSupport::Deprecation.warn(<<-MSG.squish) + The flag error_on_ignored_order_or_limit is deprecated. Limits are + now supported. Please use error_on_ignored_order instead. + MSG + self.error_on_ignored_order + end + def self.error_on_ignored_order_or_limit=(value) ActiveSupport::Deprecation.warn(<<-MSG.squish) The flag error_on_ignored_order_or_limit is deprecated. Limits are |