diff --git a/changelog/fix_make_style_collection_compact_aware_of_params.md b/changelog/fix_make_style_collection_compact_aware_of_params.md new file mode 100644 index 0000000000..e0ca6e169f --- /dev/null +++ b/changelog/fix_make_style_collection_compact_aware_of_params.md @@ -0,0 +1 @@ +* [#1302](https://github.com/rubocop/rubocop-rails/pull/1302): Make `Style/CollectionMethods` aware of `params`. ([@koic][]) diff --git a/config/default.yml b/config/default.yml index 4b389ce841..6c2f5f6756 100644 --- a/config/default.yml +++ b/config/default.yml @@ -1234,6 +1234,10 @@ Rails/WhereRange: Style/AndOr: EnforcedStyle: conditionals +Style/CollectionCompact: + AllowedReceivers: + - params + Style/FormatStringToken: AllowedMethods: - redirect diff --git a/rubocop-rails.gemspec b/rubocop-rails.gemspec index 99e503272c..d988e89a80 100644 --- a/rubocop-rails.gemspec +++ b/rubocop-rails.gemspec @@ -35,6 +35,6 @@ Gem::Specification.new do |s| # Rack::Utils::SYMBOL_TO_STATUS_CODE, which is used by HttpStatus cop, was # introduced in rack 1.1 s.add_runtime_dependency 'rack', '>= 1.1' - s.add_runtime_dependency 'rubocop', '>= 1.33.0', '< 2.0' + s.add_runtime_dependency 'rubocop', '>= 1.52.0', '< 2.0' s.add_runtime_dependency 'rubocop-ast', '>= 1.31.1', '< 2.0' end