From c16d9d244b94907431e577ef2432c1f7af8d7dfc Mon Sep 17 00:00:00 2001 From: Gleb Rysev <gr00314@surrey.ac.uk> Date: Sun, 16 May 2021 20:35:06 +0100 Subject: [PATCH] Merge branch '28-controller-tests' into Development --- app/controllers/habits_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/habits_controller.rb b/app/controllers/habits_controller.rb index 3a604c9..795c17c 100644 --- a/app/controllers/habits_controller.rb +++ b/app/controllers/habits_controller.rb @@ -76,15 +76,12 @@ class HabitsController < ApplicationController format.html { redirect_to :root, notice: 'You have already done that today. Come back tomorrow!' } end end -<<<<<<< HEAD + if @habit.max_streak.nil? @habit.max_streak = @habit.streak @habit.save elsif @habit.streak > @habit.max_streak -======= - if @habit.max_streak.nil? || @habit.streak > @habit.max_streak ->>>>>>> 28-controller-tests @habit.max_streak = @habit.streak @habit.save end -- GitLab