Add and apply Style/ArgumentsForwarding rule

We were using generic names like `args` and `options` which don't really
add anything to `*` or `**` because Ruby required us to.

That's no longer the case in Ruby 3.2, so we can simplify the code a
bit.
This commit is contained in:
Javi Martín
2024-02-29 00:22:58 +01:00
parent 7840c98660
commit fdfdbcbd0d
12 changed files with 25 additions and 27 deletions

View File

@@ -7,13 +7,8 @@ class Admin::Budgets::ActionsComponent < ApplicationComponent
private
def action(action_name, **options)
render Admin::ActionComponent.new(
action_name,
budget,
"aria-describedby": true,
**options
)
def action(action_name, **)
render Admin::ActionComponent.new(action_name, budget, "aria-describedby": true, **)
end
def actions

View File

@@ -8,8 +8,8 @@ class Admin::Budgets::LinksComponent < ApplicationComponent
private
def action(action_name, **options)
render Admin::ActionComponent.new(action_name, budget, **options)
def action(action_name, **)
render Admin::ActionComponent.new(action_name, budget, **)
end
def results_text

View File

@@ -6,8 +6,8 @@ class Admin::TableActionsComponent < ApplicationComponent
@options = options
end
def action(action_name, **args)
render Admin::ActionComponent.new(action_name, record, "aria-label": true, **args)
def action(action_name, **)
render Admin::ActionComponent.new(action_name, record, "aria-label": true, **)
end
private