diff --git a/CHANGELOG.md b/CHANGELOG.md index 08a9fbaad7..1db498a751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ ## master (unreleased) +## 2.22.1 (2023-10-28) + ### Bug fixes * [#1145](https://github.com/rubocop/rubocop-rails/issues/1145): Fix a false positive for `Rails/DuplicateAssociation` when using duplicate `belongs_to` associations of same class without other arguments. ([@koic][]) diff --git a/docs/antora.yml b/docs/antora.yml index 9e0ff48acb..aaeffb2967 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.22' nav: - modules/ROOT/nav.adoc diff --git a/docs/modules/ROOT/pages/cops_rails.adoc b/docs/modules/ROOT/pages/cops_rails.adoc index 1f96fefac4..73d6e0a1b1 100644 --- a/docs/modules/ROOT/pages/cops_rails.adoc +++ b/docs/modules/ROOT/pages/cops_rails.adoc @@ -1638,12 +1638,12 @@ belongs_to :bar has_one :foo # bad -belongs_to :foo, class_name: 'Foo' -belongs_to :bar, class_name: 'Foo' +has_many :foo, class_name: 'Foo' +has_many :bar, class_name: 'Foo' has_one :baz # good -belongs_to :bar, class_name: 'Foo' +has_many :bar, class_name: 'Foo' has_one :foo ---- diff --git a/lib/rubocop/rails/version.rb b/lib/rubocop/rails/version.rb index 0fa9f994a5..ee4f88597e 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.22.0' + STRING = '2.22.1' def self.document_version STRING.match('\d+\.\d+').to_s diff --git a/relnotes/v2.22.1.md b/relnotes/v2.22.1.md new file mode 100644 index 0000000000..ec964ad248 --- /dev/null +++ b/relnotes/v2.22.1.md @@ -0,0 +1,5 @@ +### Bug fixes + +* [#1145](https://github.com/rubocop/rubocop-rails/issues/1145): Fix a false positive for `Rails/DuplicateAssociation` when using duplicate `belongs_to` associations of same class without other arguments. ([@koic][]) + +[@koic]: https://github.com/koic