Skip to content

Commit fda7a43

Browse files
committed
Cut 2.21.2
1 parent c0d83ee commit fda7a43

File tree

5 files changed

+37
-5
lines changed

5 files changed

+37
-5
lines changed

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.21.2 (2023-09-30)
13+
1214
### Bug fixes
1315

1416
* [#1126](https://github.com/rubocop/rubocop-rails/pull/1126): Fix a false positive for `Rails/RedundantActiveRecordAllMethod` when using some `Enumerable`'s methods with block argument. ([@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.21'
66
nav:
77
- modules/ROOT/nav.adoc

docs/modules/ROOT/pages/cops_rails.adoc

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4324,6 +4324,25 @@ users.where(id: ids)
43244324
user.articles.order(:created_at)
43254325
----
43264326

4327+
==== AllowedReceivers: ['ActionMailer::Preview', 'ActiveSupport::TimeZone'] (default)
4328+
4329+
[source,ruby]
4330+
----
4331+
# good
4332+
ActionMailer::Preview.all.first
4333+
ActiveSupport::TimeZone.all.first
4334+
----
4335+
4336+
=== Configurable attributes
4337+
4338+
|===
4339+
| Name | Default value | Configurable values
4340+
4341+
| AllowedReceivers
4342+
| `ActionMailer::Preview`, `ActiveSupport::TimeZone`
4343+
| Array
4344+
|===
4345+
43274346
=== References
43284347

43294348
* https://rails.rubystyle.guide/#redundant-all
@@ -6571,7 +6590,7 @@ end
65716590

65726591
| Pending
65736592
| Yes
6574-
| Yes
6593+
| No
65756594
| 2.21
65766595
| -
65776596
|===
@@ -6590,8 +6609,8 @@ render 'foo', status: :continue
65906609
render status: 100, plain: 'Ruby!'
65916610
65926611
# good
6593-
render status: :continue
6594-
render status: 100
6612+
head :continue
6613+
head 100
65956614
----
65966615

65976616
=== Configurable attributes

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.21.1'
7+
STRING = '2.21.2'
88

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

relnotes/v2.21.2.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Bug fixes
2+
3+
* [#1126](https://github.com/rubocop/rubocop-rails/pull/1126): Fix a false positive for `Rails/RedundantActiveRecordAllMethod` when using some `Enumerable`'s methods with block argument. ([@koic][])
4+
* [#1121](https://github.com/rubocop/rubocop-rails/issues/1121): Fix an error for `Rails/SelectMap` when using `select(:column_name).map(&:column_name)` without receiver model. ([@koic][])
5+
* [#1119](https://github.com/rubocop/rubocop-rails/issues/1119): Fix an incorrect autocorrect for `Rails/RedundantActiveRecordAllMethod` when `all` has parentheses. ([@masato-bkn][])
6+
* [#1130](https://github.com/rubocop/rubocop-rails/issues/1130): Fix crash for `Rails/UniqueValidationWithoutIndex` with bare validate. ([@jamiemccarthy][])
7+
* [#1124](https://github.com/rubocop/rubocop-rails/issues/1124): Fix false positives for `Rails/RedundantActiveRecordAllMethod` when receiver is not an Active Record model. ([@koic][])
8+
9+
[@koic]: https://github.com/koic
10+
[@masato-bkn]: https://github.com/masato-bkn
11+
[@jamiemccarthy]: https://github.com/jamiemccarthy

0 commit comments

Comments
 (0)