Skip to content

Commit 82c068f

Browse files
committed
Mark Rails/TimeZone as unsafe auto-correction from unsafe
Follow up to #575 (comment) This PR marks `Rails/TimeZone` as unsafe auto-correction from unsafe.
1 parent 1ca074e commit 82c068f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* [#576](https://github.com/rubocop/rubocop-rails/pull/576): Mark `Rails/TimeZone` as unsafe auto-correction from unsafe. ([@koic][])

config/default.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,9 +789,9 @@ Rails/TimeZone:
789789
StyleGuide: 'https://rails.rubystyle.guide#time'
790790
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
791791
Enabled: true
792-
Safe: false
792+
SafeAutoCorrect: false
793793
VersionAdded: '0.30'
794-
VersionChanged: '2.10'
794+
VersionChanged: '2.13'
795795
# The value `strict` means that `Time` should be used with `zone`.
796796
# The value `flexible` allows usage of `in_time_zone` instead of `zone`.
797797
EnforcedStyle: flexible

docs/modules/ROOT/pages/cops_rails.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4600,10 +4600,10 @@ SQL
46004600
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed
46014601

46024602
| Enabled
4603-
| No
4603+
| Yes
46044604
| Yes (Unsafe)
46054605
| 0.30
4606-
| 2.10
4606+
| 2.13
46074607
|===
46084608

46094609
This cop checks for the use of Time methods without zone.

0 commit comments

Comments
 (0)