diff --git a/changelog/change_mark_rails_time_zone_as_unsafe_auto_correction.md b/changelog/change_mark_rails_time_zone_as_unsafe_auto_correction.md new file mode 100644 index 0000000000..9bbd913000 --- /dev/null +++ b/changelog/change_mark_rails_time_zone_as_unsafe_auto_correction.md @@ -0,0 +1 @@ +* [#576](https://github.com/rubocop/rubocop-rails/pull/576): Mark `Rails/TimeZone` as unsafe auto-correction from unsafe. ([@koic][]) diff --git a/config/default.yml b/config/default.yml index b20840459e..5c595e905b 100644 --- a/config/default.yml +++ b/config/default.yml @@ -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 diff --git a/docs/modules/ROOT/pages/cops_rails.adoc b/docs/modules/ROOT/pages/cops_rails.adoc index 26b0448e0a..5169aa4da6 100644 --- a/docs/modules/ROOT/pages/cops_rails.adoc +++ b/docs/modules/ROOT/pages/cops_rails.adoc @@ -4600,10 +4600,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.