Skip to content

Commit 847d0b8

Browse files
authored
Merge pull request #576 from koic/change_mark_rails_time_zone_as_unsafe_auto_correction
Mark `Rails/TimeZone` as unsafe auto-correction from unsafe
2 parents b83b76b + 82c068f commit 847d0b8

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
@@ -4710,10 +4710,10 @@ SQL
47104710
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed
47114711

47124712
| Enabled
4713-
| No
4713+
| Yes
47144714
| Yes (Unsafe)
47154715
| 0.30
4716-
| 2.10
4716+
| 2.13
47174717
|===
47184718

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

0 commit comments

Comments
 (0)