1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix missing backticks in errors

These weren't consistent. In some errors we were using backticks and
others we weren't. This fixes `connected_to` errors to use backticks
around the method name
This commit is contained in:
eileencodes 2020-09-21 16:47:14 -04:00
parent 36b76556ad
commit 315f8b4603
No known key found for this signature in database
GPG key ID: BA5C575120BBE8DF
2 changed files with 2 additions and 2 deletions

View file

@ -135,7 +135,7 @@ module ActiveRecord
#
# The database kwarg is deprecated and will be removed in 6.2.0 without replacement.
def connected_to(database: nil, role: nil, shard: nil, prevent_writes: false, &blk)
raise NotImplementedError, "connected_to can only be called on ActiveRecord::Base" unless self == Base
raise NotImplementedError, "`connected_to` can only be called on ActiveRecord::Base" unless self == Base
if database
ActiveSupport::Deprecation.warn("The database key in `connected_to` is deprecated. It will be removed in Rails 6.2.0 without replacement.")

View file

@ -1674,7 +1674,7 @@ class BasicsTest < ActiveRecord::TestCase
Bird.connected_to(role: :reading) { }
end
assert_equal "connected_to can only be called on ActiveRecord::Base", error.message
assert_equal "`connected_to` can only be called on ActiveRecord::Base", error.message
end
test "preventing writes applies to all connections on a handler" do