lib/rubocop/cop/rails/time_zone.rb in rubocop-rails-2.14.2 vs lib/rubocop/cop/rails/time_zone.rb in rubocop-rails-2.15.0
- old
+ new
@@ -1,11 +1,11 @@
# frozen_string_literal: true
module RuboCop
module Cop
module Rails
- # This cop checks for the use of Time methods without zone.
+ # Checks for the use of Time methods without zone.
#
# Built on top of Ruby on Rails style guide (https://rails.rubystyle.guide#time)
# and the article http://danilenko.org/2012/7/6/rails_timezones/
#
# Two styles are supported for this cop. When `EnforcedStyle` is 'strict'
@@ -26,19 +26,19 @@
# Time.current
# Time.zone.now
# Time.zone.parse('2015-03-02T19:05:37')
# Time.zone.parse('2015-03-02T19:05:37Z') # Respect ISO 8601 format with timezone specifier.
#
- # @example EnforcedStyle: strict
- # # `strict` means that `Time` should be used with `zone`.
- #
- # # bad
- # Time.at(timestamp).in_time_zone
- #
# @example EnforcedStyle: flexible (default)
# # `flexible` allows usage of `in_time_zone` instead of `zone`.
#
# # good
+ # Time.at(timestamp).in_time_zone
+ #
+ # @example EnforcedStyle: strict
+ # # `strict` means that `Time` should be used with `zone`.
+ #
+ # # bad
# Time.at(timestamp).in_time_zone
class TimeZone < Base
include ConfigurableEnforcedStyle
extend AutoCorrector