Skip to content

Commit 6d6fca2

Browse files
committed
Cut 2.26.1
1 parent 22bc59e commit 6d6fca2

File tree

6 files changed

+36
-5
lines changed

6 files changed

+36
-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.26.1 (2024-09-07)
13+
1214
### Bug fixes
1315

1416
* [#1343](https://github.com/rubocop/rubocop-rails/issues/1343): Fix false negatives for `Rails/EnumSyntax` for non-literal mappings. ([@earlopain][])

config/default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Rails/ApplicationRecord:
212212
Enabled: true
213213
SafeAutoCorrect: false
214214
VersionAdded: '0.49'
215-
VersionChanged: '<<next>>'
215+
VersionChanged: '2.26'
216216
Exclude:
217217
- db/**/*.rb
218218

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.26'
66
nav:
77
- modules/ROOT/nav.adoc

docs/modules/ROOT/pages/cops_rails.adoc

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,11 +612,15 @@ end
612612
| Yes
613613
| Always (Unsafe)
614614
| 0.49
615-
| 2.5
615+
| 2.26
616616
|===
617617
618618
Checks that models subclass `ApplicationRecord` with Rails 5.0.
619619
620+
It is a common practice to define models inside migrations in order to retain forward
621+
compatibility by avoiding loading any application code. And so migration files are excluded
622+
by default for this cop.
623+
620624
=== Safety
621625
622626
This cop's autocorrection is unsafe because it may let the logic from `ApplicationRecord`
@@ -638,6 +642,16 @@ class Rails4Model < ActiveRecord::Base
638642
end
639643
----
640644
645+
=== Configurable attributes
646+
647+
|===
648+
| Name | Default value | Configurable values
649+
650+
| Exclude
651+
| `+db/**/*.rb+`
652+
| Array
653+
|===
654+
641655
== Rails/ArelStar
642656
643657
|===
@@ -4178,7 +4192,7 @@ core extensions to the numeric classes.
41784192
3.day.ago
41794193
1.months.ago
41804194
5.megabyte
4181-
1.gigabyte
4195+
1.gigabytes
41824196
41834197
# good
41844198
3.days.ago
@@ -5458,6 +5472,8 @@ File.read(Rails.root.join('db', 'schema.rb'))
54585472
File.binread(Rails.root.join('db', 'schema.rb'))
54595473
File.write(Rails.root.join('db', 'schema.rb'), content)
54605474
File.binwrite(Rails.root.join('db', 'schema.rb'), content)
5475+
Dir.glob(Rails.root.join('db', 'schema.rb'))
5476+
Dir[Rails.root.join('db', 'schema.rb')]
54615477
54625478
# good
54635479
Rails.root.join('db', 'schema.rb').open
@@ -5466,6 +5482,7 @@ Rails.root.join('db', 'schema.rb').read
54665482
Rails.root.join('db', 'schema.rb').binread
54675483
Rails.root.join('db', 'schema.rb').write(content)
54685484
Rails.root.join('db', 'schema.rb').binwrite(content)
5485+
Rails.root.glob("db/schema.rb")
54695486
----
54705487
54715488
== Rails/RootPublicPath

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.26.0'
7+
STRING = '2.26.1'
88

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

relnotes/v2.26.1.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### Bug fixes
2+
3+
* [#1343](https://github.com/rubocop/rubocop-rails/issues/1343): Fix false negatives for `Rails/EnumSyntax` for non-literal mappings. ([@earlopain][])
4+
* [#1340](https://github.com/rubocop/rubocop-rails/issues/1340): Fix a false positive for `Rails/WhereEquals`, `Rails/WhereNot`, and `Rails/WhereRange` when qualifying the database name. ([@earlopain][])
5+
6+
### Changes
7+
8+
* [#1342](https://github.com/rubocop/rubocop-rails/issues/1342): Change `Rails/ApplicationRecord` to ignore migrations. ([@fatkodima][])
9+
* [#1350](https://github.com/rubocop/rubocop-rails/pull/1350): Change `Rails/EnumSyntax` to autocorrect underscored options. ([@fatkodima][])
10+
11+
[@earlopain]: https://github.com/earlopain
12+
[@fatkodima]: https://github.com/fatkodima

0 commit comments

Comments
 (0)