Add and apply Rails/OrderArguments rubocop rule

This rule was introduced in rubocop-rails 2.33. We were following it
most of the time.
This commit is contained in:
Javi Martín
2025-10-31 13:02:09 +01:00
parent 0c5dc24cc2
commit 048bdb2e9e
12 changed files with 17 additions and 14 deletions

View File

@@ -35,11 +35,11 @@ class Admin::BudgetInvestments::SearchFormComponent < ApplicationComponent
end
def valuator_group_select_options
ValuatorGroup.order("name ASC").map { |g| [g.name, "group_#{g.id}"] }
ValuatorGroup.order(:name).map { |g| [g.name, "group_#{g.id}"] }
end
def valuator_select_options
budget.valuators.order("description ASC").order("users.email ASC").includes(:user)
budget.valuators.order(:description).order("users.email ASC").includes(:user)
.map { |v| [v.description_or_email, "valuator_#{v.id}"] }
end