RailsCasts Pro episodes are now free!

Learn more or hide this

Chris Fletcher's Profile

GitHub User: studio625

Site: www.studio625.net

Comments by Chris Fletcher


I kept getting this when I tried to update my password:
ArgumentError in PasswordResetsController#update
comparison of Date with ActiveSupport::TimeWithZone failed

Fixed it by doing this:

if @user.password_reset_sent_at < 2.hours.ago.to_date