Run rubocop-rails with current Rails version 7.0

This adds three new issues I will address in the next commits.

```
Offenses:

app/json_schemas/json_api_schema.rb:40:7: C: [Correctable] Rails/IndexWith: Prefer index_with over to_h { ... }.
      relationships.to_h { |name| [name, relationship_schema(name)] }
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/reporting/reports/enterprise_fee_summary/base.rb:18:11: C: [Correctable] Rails/IndexWith: Prefer index_with over map { ... }.to_h.
          data_attributes.map { |attr| [attr, I18n.t("header.#{attr}", scope: i18n_scope)] }.to_h
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/reporting/reports/sales_tax/sales_tax_totals_by_order.rb:140:14: C: [Correctable] Rails/Pick: Prefer pick('sum(amount)') over pluck('sum(amount)').first.
            .pluck('sum(amount)').first || 0
             ^^^^^^^^^^^^^^^^^^^^^^^^^^

1404 files inspected, 3 offenses detected, 3 offenses autocorrectable
```
This commit is contained in:
Maikel Linke
2023-04-14 16:15:13 +10:00
parent c70a694111
commit 33409725a5

View File

@@ -4,7 +4,6 @@
AllCops:
NewCops: disable
SuggestExtensions: false
TargetRailsVersion: 5.0
Exclude:
- 'bin/**/*'
- 'db/**/*'