File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
actionpack/lib/action_controller Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ class Railtie < Rails::Railtie # :nodoc:
96
96
end
97
97
98
98
initializer "action_controller.query_log_tags" do |app |
99
- if app . config . active_record . query_log_tags_enabled && app . config . action_controller . log_query_tags_around_actions != false
99
+ query_logs_tags_enabled = app . config . respond_to? ( :active_record ) &&
100
+ app . config . active_record . query_log_tags_enabled &&
101
+ app . config . action_controller . log_query_tags_around_actions
102
+
103
+ if query_logs_tags_enabled
100
104
app . config . active_record . query_log_tags += [ :controller , :action ]
101
105
102
106
ActiveSupport . on_load ( :action_controller ) do
Original file line number Diff line number Diff line change @@ -58,7 +58,11 @@ class Railtie < Rails::Railtie # :nodoc:
58
58
end
59
59
60
60
initializer "active_job.query_log_tags" do |app |
61
- if app . config . active_record . query_log_tags_enabled && app . config . active_job . log_query_tags_around_perform != false
61
+ query_logs_tags_enabled = app . config . respond_to? ( :active_record ) &&
62
+ app . config . active_record . query_log_tags_enabled &&
63
+ app . config . active_job . log_query_tags_around_perform
64
+
65
+ if query_logs_tags_enabled
62
66
app . config . active_record . query_log_tags << :job
63
67
64
68
ActiveSupport . on_load ( :active_job ) do
You can’t perform that action at this time.
0 commit comments