lib/rubocop/cop/rails/time_zone.rb in rubocop-rails-2.5.2 vs lib/rubocop/cop/rails/time_zone.rb in rubocop-rails-2.6.0
- old
+ new
@@ -83,12 +83,10 @@
when :new
autocorrect_time_new(node, corrector)
end
# prefer `Time` over `DateTime` class
- if strict?
- corrector.replace(node.children.first.source_range, 'Time')
- end
+ corrector.replace(node.children.first.source_range, 'Time') if strict?
remove_redundant_in_time_zone(corrector, node)
end
end
private