Skip to content

Commit 8bfc91e

Browse files
committed
Cut 2.35.1
1 parent 90f8242 commit 8bfc91e

5 files changed

Lines changed: 14 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
## master (unreleased)
1111

12+
## 2.35.1 (2026-05-17)
13+
1214
### Bug fixes
1315

1416
* [#1616](https://github.com/rubocop/rubocop-rails/pull/1616): Fix false positives in `Rails/StrongParametersExpect` when using nil-safe conversion methods such as `to_i`, `to_s`, `to_a`, `to_f`, and `to_h` on `params[:key]`. ([@koic][])

docs/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ name: rubocop-rails
22
title: RuboCop Rails
33
# We always provide version without patch here (e.g. 1.1),
44
# as patch versions should not appear in the docs.
5-
version: ~
5+
version: '2.35'
66
nav:
77
- modules/ROOT/nav.adoc

docs/modules/ROOT/pages/cops_rails.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5197,7 +5197,7 @@ which can affect their behavior.
51975197
[#safety-railsredundantactiverecordallmethod]
51985198
=== Safety
51995199
5200-
This cop is unsafe for autocorrection if the receiver for `all` is not an Active Record object.
5200+
This cop is unsafe because false positives will occur if the receiver is not an Active Record object.
52015201
52025202
[#examples-railsredundantactiverecordallmethod]
52035203
=== Examples
@@ -6983,7 +6983,8 @@ Enforces the use of `ActionController::Parameters#expect` as a method for strong
69836983
In the following cases, `params[:key]` is treated as a key that is expected to be passed from the HTTP client,
69846984
and the cop detects it using the `expect` method.
69856985
6986-
- Method calls on `params[:key]` without comparison methods
6986+
- Method calls on `params[:key]` without comparison methods, methods that are safe to call
6987+
on `nil` (such as `to_i`, `to_s`, or `is_a?`), or key-check methods such as `key?`
69876988
- Passing `params[:key]` as an argument to finder methods that raise on missing records
69886989
- Strong parameter methods using `require` or `permit`
69896990

lib/rubocop/rails/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module RuboCop
44
module Rails
55
# This module holds the RuboCop Rails version information.
66
module Version
7-
STRING = '2.35.0'
7+
STRING = '2.35.1'
88

99
def self.document_version
1010
STRING.match('\d+\.\d+').to_s

relnotes/v2.35.1.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### Bug fixes
2+
3+
* [#1616](https://github.com/rubocop/rubocop-rails/pull/1616): Fix false positives in `Rails/StrongParametersExpect` when using nil-safe conversion methods such as `to_i`, `to_s`, `to_a`, `to_f`, and `to_h` on `params[:key]`. ([@koic][])
4+
* [#1622](https://github.com/rubocop/rubocop-rails/issues/1622): Fix false positives in `Rails/StrongParametersExpect` when using key-check methods such as `key?`, `has_key?`, `include?`, and `member?` on `params[:key]`. ([@koic][])
5+
* [#1620](https://github.com/rubocop/rubocop-rails/issues/1620): Fix false positives in `Rails/StrongParametersExpect` when using type-check methods such as `is_a?`, `kind_of?`, and `instance_of?` on `params[:key]`. ([@koic][])
6+
7+
[@koic]: https://github.com/koic

0 commit comments

Comments
 (0)