mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 06:31:29 +08:00
DEV: Fix Lint/ShadowingOuterLocalVariable
(#32036)
unblocks a rubocop update
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user