lib/rubocop/cop/rails/date.rb in rubocop-0.59.2 vs lib/rubocop/cop/rails/date.rb in rubocop-0.60.0

- old
+ new

@@ -4,22 +4,22 @@ module Cop module Rails # This cop checks for the correct use of Date methods, # such as Date.today, Date.current etc. # - # Using Date.today is dangerous, because it doesn't know anything about - # Rails time zone. You must use Time.zone.today instead. + # Using `Date.today` is dangerous, because it doesn't know anything about + # Rails time zone. You must use `Time.zone.today` instead. # - # The cop also reports warnings when you are using 'to_time' method, + # The cop also reports warnings when you are using `to_time` method, # because it doesn't know about Rails time zone either. # # Two styles are supported for this cop. When EnforcedStyle is 'strict' - # then the Date methods (today, current, yesterday, tomorrow) - # are prohibited and the usage of both 'to_time' - # and 'to_time_in_current_zone' is reported as warning. + # then the Date methods `today`, `current`, `yesterday`, and `tomorrow` + # are prohibited and the usage of both `to_time` + # and 'to_time_in_current_zone' are reported as warning. # - # When EnforcedStyle is 'flexible' then only 'Date.today' is prohibited - # and only 'to_time' is reported as warning. + # When EnforcedStyle is 'flexible' then only `Date.today` is prohibited + # and only `to_time` is reported as warning. # # @example EnforcedStyle: strict # # bad # Date.current # Date.yesterday