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:
parent
4f82ceaf39
commit
29cbbd6b31
6 changed files with 14 additions and 16 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue