Skip to content

Commit a17aa63

Browse files
authoredJul 23, 2024··
Merge pull request rails#52397 from yahonda/follow_up_52392
Address ApplicationTests::QueryLogsTest errors
2 parents 2ea68a1 + 8be777b commit a17aa63

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎activerecord/lib/active_record/railtie.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ class Railtie < Rails::Railtie # :nodoc:
400400
end
401401

402402
if app.config.active_record.query_log_tags_format
403-
ActiveRecord::QueryLogs.update_formatter(app.config.active_record.query_log_tags_format)
403+
ActiveRecord::QueryLogs.tags_formatter = app.config.active_record.query_log_tags_format
404404
end
405405

406406
if app.config.active_record.cache_query_log_tags

‎railties/test/application/query_logs_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,11 @@ def app
277277

278278
get "/", {}, { "HTTPS" => "on" }
279279
comment = last_response.body.strip
280-
assert_equal %(/*action:index,namespaced_controller:users,controller:users*/), comment
280+
assert_match %(/*action:index,controller:users,namespaced_controller:users*/), comment
281281

282282
get "/namespaced/users", {}, { "HTTPS" => "on" }
283283
comment = last_response.body.strip
284-
assert_equal %(/*action:index,namespaced_controller:name_spaced/users,controller:users*/), comment
284+
assert_match %(/*action:index,controller:users,namespaced_controller:name_spaced/users*/), comment
285285
end
286286

287287
private

0 commit comments

Comments
 (0)
Please sign in to comment.