Skip to content

Commit

Permalink
Merge pull request rails#52397 from yahonda/follow_up_52392
Browse files Browse the repository at this point in the history
Address ApplicationTests::QueryLogsTest errors
  • Loading branch information
yahonda authored Jul 23, 2024
2 parents 2ea68a1 + 8be777b commit a17aa63
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/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class Railtie < Rails::Railtie # :nodoc:
end

if app.config.active_record.query_log_tags_format
ActiveRecord::QueryLogs.update_formatter(app.config.active_record.query_log_tags_format)
ActiveRecord::QueryLogs.tags_formatter = app.config.active_record.query_log_tags_format
end

if app.config.active_record.cache_query_log_tags
Expand Down
4 changes: 2 additions & 2 deletions railties/test/application/query_logs_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ def app

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

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

private
Expand Down

0 comments on commit a17aa63

Please sign in to comment.