Skip to content

Commit

Permalink
Cut 2.21.2
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Sep 30, 2023
1 parent c0d83ee commit fda7a43
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

## master (unreleased)

## 2.21.2 (2023-09-30)

### Bug fixes

* [#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][])
Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: rubocop-rails
title: RuboCop Rails
# We always provide version without patch here (e.g. 1.1),
# as patch versions should not appear in the docs.
version: ~
version: '2.21'
nav:
- modules/ROOT/nav.adoc
25 changes: 22 additions & 3 deletions docs/modules/ROOT/pages/cops_rails.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4324,6 +4324,25 @@ users.where(id: ids)
user.articles.order(:created_at)
----

==== AllowedReceivers: ['ActionMailer::Preview', 'ActiveSupport::TimeZone'] (default)

[source,ruby]
----
# good
ActionMailer::Preview.all.first
ActiveSupport::TimeZone.all.first
----

=== Configurable attributes

|===
| Name | Default value | Configurable values

| AllowedReceivers
| `ActionMailer::Preview`, `ActiveSupport::TimeZone`
| Array
|===

=== References

* https://rails.rubystyle.guide/#redundant-all
Expand Down Expand Up @@ -6571,7 +6590,7 @@ end

| Pending
| Yes
| Yes
| No
| 2.21
| -
|===
Expand All @@ -6590,8 +6609,8 @@ render 'foo', status: :continue
render status: 100, plain: 'Ruby!'
# good
render status: :continue
render status: 100
head :continue
head 100
----

=== Configurable attributes
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/rails/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RuboCop
module Rails
# This module holds the RuboCop Rails version information.
module Version
STRING = '2.21.1'
STRING = '2.21.2'

def self.document_version
STRING.match('\d+\.\d+').to_s
Expand Down
11 changes: 11 additions & 0 deletions relnotes/v2.21.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Bug fixes

* [#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][])
* [#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][])
* [#1119](https://github.com/rubocop/rubocop-rails/issues/1119): Fix an incorrect autocorrect for `Rails/RedundantActiveRecordAllMethod` when `all` has parentheses. ([@masato-bkn][])
* [#1130](https://github.com/rubocop/rubocop-rails/issues/1130): Fix crash for `Rails/UniqueValidationWithoutIndex` with bare validate. ([@jamiemccarthy][])
* [#1124](https://github.com/rubocop/rubocop-rails/issues/1124): Fix false positives for `Rails/RedundantActiveRecordAllMethod` when receiver is not an Active Record model. ([@koic][])

[@koic]: https://github.com/koic
[@masato-bkn]: https://github.com/masato-bkn
[@jamiemccarthy]: https://github.com/jamiemccarthy

0 comments on commit fda7a43

Please sign in to comment.