diff --git a/CHANGELOG.md b/CHANGELOG.md index f995c19ac6..13df636ab8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ ## master (unreleased) +## 2.26.2 (2024-09-21) + ### Bug fixes * [#1362](https://github.com/rubocop/rubocop-rails/issues/1362): Fix false positives for `Rails/EnumSyntax` when using Ruby 2.7. ([@koic][]) diff --git a/docs/antora.yml b/docs/antora.yml index 9e0ff48acb..0e3477f379 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -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.26' nav: - modules/ROOT/nav.adoc diff --git a/docs/modules/ROOT/pages/cops_rails.adoc b/docs/modules/ROOT/pages/cops_rails.adoc index ad89ca7c52..b9892b58eb 100644 --- a/docs/modules/ROOT/pages/cops_rails.adoc +++ b/docs/modules/ROOT/pages/cops_rails.adoc @@ -1109,6 +1109,8 @@ collection.reject(&:blank?) collection.reject { |_k, v| v.blank? } collection.select(&:present?) collection.select { |_k, v| v.present? } +collection.filter(&:present?) +collection.filter { |_k, v| v.present? } # good collection.compact_blank @@ -1925,6 +1927,8 @@ enum status: { active: 0, archived: 1 } == Rails/EnumSyntax +NOTE: Required Ruby version: 3.0 + |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed diff --git a/lib/rubocop/rails/version.rb b/lib/rubocop/rails/version.rb index c77f1c36d1..15095dece0 100644 --- a/lib/rubocop/rails/version.rb +++ b/lib/rubocop/rails/version.rb @@ -4,7 +4,7 @@ module RuboCop module Rails # This module holds the RuboCop Rails version information. module Version - STRING = '2.26.1' + STRING = '2.26.2' def self.document_version STRING.match('\d+\.\d+').to_s diff --git a/relnotes/v2.26.2.md b/relnotes/v2.26.2.md new file mode 100644 index 0000000000..93e5c7a53b --- /dev/null +++ b/relnotes/v2.26.2.md @@ -0,0 +1,13 @@ +### Bug fixes + +* [#1362](https://github.com/rubocop/rubocop-rails/issues/1362): Fix false positives for `Rails/EnumSyntax` when using Ruby 2.7. ([@koic][]) +* [#1269](https://github.com/rubocop/rubocop-rails/issues/1269): Fix false positives for `Rails/ActionControllerFlashBeforeRender` in combination with implicit returns. ([@earlopain][]) +* [#1326](https://github.com/rubocop/rubocop-rails/pull/1326): Fix wrong autocorrect for `Rails/FilePath` when passing an array to `File.join`. ([@earlopain][]) + +### Changes + +* [#1359](https://github.com/rubocop/rubocop-rails/pull/1359): Support `filter` in `Rails/CompactBlank`. ([@masato-bkn][]) + +[@koic]: https://github.com/koic +[@earlopain]: https://github.com/earlopain +[@masato-bkn]: https://github.com/masato-bkn