Skip to content

Commit 5b39007

Browse files
committed
Escape "on" in yaml for correct parsing
TIL yaml treats true, on and yes as boolean values. So there was no Rubocop bug, but rather `on` was not treated as a string literal.
1 parent 1f9a039 commit 5b39007

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ Naming/MethodParameterName:
326326
- id
327327
- to
328328
- _
329-
- on
329+
- "on"
330330

331331
# Rubocop doesn't understand side-effects
332332
Style/IdenticalConditionalBranches:

admin/app/helpers/solidus_admin/stimulus_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def stimulus_controller
1010
{ "data-controller": stimulus_id }
1111
end
1212

13-
def stimulus_action(action, on: nil) # rubocop:disable Naming/MethodParameterName
13+
def stimulus_action(action, on: nil)
1414
action_construct = []
1515
action_construct << "#{on}->" if on.present?
1616
action_construct << "#{stimulus_id}##{action}"

0 commit comments

Comments
 (0)