Skip to content

Commit

Permalink
Fix ServicePerformMethod autocorrect
Browse files Browse the repository at this point in the history
Closes #9.
  • Loading branch information
jeromedalbert committed Dec 9, 2024
1 parent f53d928 commit cc667e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/obsession/rails/service_perform_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def on_class(class_node)

if method.method_name != :perform
add_offense(method) do |corrector|
corrector.replace(method, method.source.sub(/#{method.method_name}/, 'perform'))
corrector.replace(method, method.source.sub(method.method_name.to_s, 'perform'))
end
end
end
Expand Down

0 comments on commit cc667e4

Please sign in to comment.