We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e3e1a0 commit 1624246Copy full SHA for 1624246
activerecord/lib/active_record/query_logs.rb
@@ -154,14 +154,24 @@ def tag_content
154
tags.flat_map { |i| [*i] }.filter_map do |tag|
155
key, value_input = tag
156
val = case value_input
157
- when nil then instance_exec(&taggings[key]) if taggings.has_key? key
+ when nil then tag_value(key) if taggings.has_key? key
158
when Proc then instance_exec(&value_input)
159
else value_input
160
end
161
"#{key}:#{val}" unless val.nil?
162
end.join(",")
163
164
165
+ def tag_value(key)
166
+ value = taggings[key]
167
+
168
+ if value.respond_to?(:call)
169
+ instance_exec(&taggings[key])
170
+ else
171
+ value
172
+ end
173
174
175
def inline_tag_content
176
inline_tags.join
177
0 commit comments