Skip to content

Commit

Permalink
Merge pull request #576 from koic/change_mark_rails_time_zone_as_unsa…
Browse files Browse the repository at this point in the history
…fe_auto_correction

Mark `Rails/TimeZone` as unsafe auto-correction from unsafe
  • Loading branch information
koic committed Oct 20, 2021
2 parents b83b76b + 82c068f commit 847d0b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#576](https://github.com/rubocop/rubocop-rails/pull/576): Mark `Rails/TimeZone` as unsafe auto-correction from unsafe. ([@koic][])
4 changes: 2 additions & 2 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,9 @@ Rails/TimeZone:
StyleGuide: 'https://rails.rubystyle.guide#time'
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
Enabled: true
Safe: false
SafeAutoCorrect: false
VersionAdded: '0.30'
VersionChanged: '2.10'
VersionChanged: '2.13'
# The value `strict` means that `Time` should be used with `zone`.
# The value `flexible` allows usage of `in_time_zone` instead of `zone`.
EnforcedStyle: flexible
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/cops_rails.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4710,10 +4710,10 @@ SQL
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Enabled
| No
| Yes
| Yes (Unsafe)
| 0.30
| 2.10
| 2.13
|===

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

0 comments on commit 847d0b8

Please sign in to comment.