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.
上级 9a1ab667
......@@ -78,7 +78,14 @@ def self.configurations
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册