app/controllers/registrations_controller.rb
Unused block argument - k
. If it's necessary, use _
or _k
as an argument name to indicate that it won't be used. Open
Open
updated_params.delete_if do |k, v|
- Read upRead up
- Exclude checks
This cop checks for unused block arguments.
Example:
# bad
do_something do |used, unused|
puts used
end
do_something do |bar|
puts :foo
end
define_method(:foo) do |bar|
puts :baz
end
Example:
#good
do_something do |used, _unused|
puts used
end
do_something do
puts :foo
end
define_method(:foo) do |_bar|
puts :baz
end