You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the default of AllowToTime could be false, or we could omit the AllowToTime attribute and always complain to_time to prevent using the system time zone. How about it?
Expected behavior
rubocop-rails complains to_time with default settings.
Actual behavior
rubocop-rails complains to_time only if the AllowToTime attribute is set to false.
Currently, the
Rails/Date
cop has theAllowToTime
attribute, and its default istrue
.https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsdate
This was because
DateTime
already has the application time zone, therefore usingDateTime#to_time
method was not a problem.#288
However,
DateTime
class has been deprecated since September 2020.ruby/date@58ca6e6
I think the default of
AllowToTime
could be false, or we could omit theAllowToTime
attribute and always complainto_time
to prevent using the system time zone. How about it?Expected behavior
rubocop-rails
complainsto_time
with default settings.Actual behavior
rubocop-rails
complainsto_time
only if theAllowToTime
attribute is set to false.Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: