Skip to content
Snippets Groups Projects
Commit 0c0271e1 authored by Butler, Alexis (UG - Computer Science)'s avatar Butler, Alexis (UG - Computer Science)
Browse files

Weird tracking bug

parent 9ed80c66
No related branches found
No related tags found
No related merge requests found
Pipeline #30789 failed
...@@ -85,8 +85,10 @@ class HabitsController < ApplicationController ...@@ -85,8 +85,10 @@ class HabitsController < ApplicationController
format.html { redirect_to :root, notice: 'You have already done that today. Come back tomorrow!' } format.html { redirect_to :root, notice: 'You have already done that today. Come back tomorrow!' }
end end
end end
if @habit.max_streak.nil?
if @habit.streak > @habit.max_streak || @habit.max_streak.nil? @habit.max_streak = @habit.streak
@habit.save
elsif @habit.streak > @habit.max_streak
@habit.max_streak = @habit.streak @habit.max_streak = @habit.streak
@habit.save @habit.save
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment