Skip to content

Commit

Permalink
Remove deprecated configuration .error_on_ignored_order_or_limit
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Oct 23, 2017
1 parent 9c6ee1b commit e1066f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 48 deletions.
4 changes: 4 additions & 0 deletions activerecord/CHANGELOG.md
@@ -1,3 +1,7 @@
* Remove deprecated configuration `.error_on_ignored_order_or_limit`.

*Rafael Mendonça França*

* Remove deprecated arguments from `#verify!`.

*Rafael Mendonça França*
Expand Down
20 changes: 0 additions & 20 deletions activerecord/lib/active_record/core.rb
Expand Up @@ -76,26 +76,6 @@ def self.configurations
# scope being ignored is error-worthy, rather than a warning.
mattr_accessor :error_on_ignored_order, instance_writer: false, default: 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
error_on_ignored_order
end

def error_on_ignored_order_or_limit
self.class.error_on_ignored_order_or_limit
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
now supported. Please use error_on_ignored_order= instead.
MSG
self.error_on_ignored_order = value
end

##
# :singleton-method:
# Specify whether or not to use timestamps for migration versions
Expand Down
28 changes: 0 additions & 28 deletions activerecord/test/cases/batches_test.rb
Expand Up @@ -586,34 +586,6 @@ def test_find_in_batches_should_return_a_sized_enumerator
end
end

test ".error_on_ignored_order_or_limit= is deprecated" do
begin
prev = ActiveRecord::Base.error_on_ignored_order
assert_deprecated "Please use error_on_ignored_order= instead." do
ActiveRecord::Base.error_on_ignored_order_or_limit = true
end
assert ActiveRecord::Base.error_on_ignored_order
ensure
ActiveRecord::Base.error_on_ignored_order = prev
end
end

test ".error_on_ignored_order_or_limit is deprecated" do
expected = ActiveRecord::Base.error_on_ignored_order
actual = assert_deprecated "Please use error_on_ignored_order instead." do
ActiveRecord::Base.error_on_ignored_order_or_limit
end
assert_equal expected, actual
end

test "#error_on_ignored_order_or_limit is deprecated" do
expected = ActiveRecord::Base.error_on_ignored_order
actual = assert_deprecated "Please use error_on_ignored_order instead." do
Post.new.error_on_ignored_order_or_limit
end
assert_equal expected, actual
end

test ".find_each respects table alias" do
assert_queries(1) do
table_alias = Post.arel_table.alias("omg_posts")
Expand Down

0 comments on commit e1066f4

Please sign in to comment.