2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-08-20 18:52:44 +08:00

DEV: Fix Lint/ShadowingOuterLocalVariable (#32036)

unblocks a rubocop update
This commit is contained in:
Jarek Radosz 2025-03-27 13:50:24 +01:00 committed by GitHub
parent 4f82ceaf39
commit 29cbbd6b31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 16 deletions

View file

@ -73,14 +73,14 @@ module DiscourseAutomation
end
end
def placeholder(name = nil, triggerable: nil, &block)
def placeholder(placeholder_name = nil, triggerable: nil, &block)
if block_given?
result = yield(@automation.serialized_fields, @automation)
Array(result).each do |name|
@placeholders << { name: name.to_sym, triggerable: triggerable&.to_sym }
end
elsif name
@placeholders << { name: name.to_sym, triggerable: triggerable&.to_sym }
elsif placeholder_name
@placeholders << { name: placeholder_name.to_sym, triggerable: triggerable&.to_sym }
end
end