Skip to content

Commit

Permalink
Fix grammar and diction of NOR conditions warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Feb 6, 2020
1 parent ee65181 commit fdaa318
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/relation/query_methods.rb
Expand Up @@ -51,7 +51,7 @@ def not(opts, *rest)
if not_behaves_as_nor?(opts)
ActiveSupport::Deprecation.warn(<<~MSG.squish)
NOT conditions will no longer behave as NOR in Rails 6.1.
To continue using NOR conditions, NOT each conditions manually
To continue using NOR conditions, NOT each condition individually
(`#{
opts.flat_map { |key, value|
if value.is_a?(Hash) && value.size > 1
Expand Down
4 changes: 2 additions & 2 deletions activerecord/test/cases/relation/where_test.rb
Expand Up @@ -167,7 +167,7 @@ def test_where_not_polymorphic_id_and_type_as_nor_is_deprecated

message = <<~MSG.squish
NOT conditions will no longer behave as NOR in Rails 6.1.
To continue using NOR conditions, NOT each conditions manually
To continue using NOR conditions, NOT each condition individually
(`.where.not(:estimate_of_type => ...).where.not(:estimate_of_id => ...)`).
MSG
actual = assert_deprecated(message) do
Expand All @@ -188,7 +188,7 @@ def test_where_not_association_as_nor_is_deprecated

message = <<~MSG.squish
NOT conditions will no longer behave as NOR in Rails 6.1.
To continue using NOR conditions, NOT each conditions manually
To continue using NOR conditions, NOT each condition individually
(`.where.not(:price_estimates => { :price => ... }).where.not(:price_estimates => { :currency => ... })`).
MSG
assert_deprecated(message) do
Expand Down

0 comments on commit fdaa318

Please sign in to comment.