From 555ab801c0f08635d00e732246c7970a1d4883e7 Mon Sep 17 00:00:00 2001 From: "Butler, Alexis (UG - Computer Science)" <ab02259@surrey.ac.uk> Date: Tue, 11 May 2021 17:00:08 +0100 Subject: [PATCH] Link mobile buttons to actions --- app/views/habits/_habit.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/habits/_habit.html.erb b/app/views/habits/_habit.html.erb index 01e0d2c..d536e1a 100644 --- a/app/views/habits/_habit.html.erb +++ b/app/views/habits/_habit.html.erb @@ -19,13 +19,13 @@ <div class="habit-index-mobile-icons-container"> <div class="row"> <div class="col pl-1 pr-1"> - <%=link_to raw("<i class='fas fa-edit fa-lg'></i>"), root_path, method: :get, class:"btn btn-info mobile-index-icon" %> + <%=link_to raw("<i class='fas fa-edit fa-lg'></i>"), track_habit_path(habit), method: :post, class:"btn btn-info mobile-index-icon" %> </div> <div class="col pl-1 pr-1"> - <%=link_to raw("<i class='far fa-calendar-alt fa-lg'></i>"), root_path, method: :get, class:"btn btn-info mobile-index-icon" %> + <%=link_to raw("<i class='far fa-calendar-alt fa-lg'></i>"), habit_schedules_path(habit), method: :get, class:"btn btn-info mobile-index-icon" %> </div> <div class="col pl-1 pr-1"> - <%=link_to raw("<i class='fas fa-cogs fa-lg'></i>"), habit, method: :delete, data: { confirm: 'Are you sure?' }, class:"btn btn-info mobile-index-icon" %> + <%=link_to raw("<i class='fas fa-cogs fa-lg'></i>"), edit_habit_path(habit), method: :get, class:"btn btn-info mobile-index-icon" %> </div> </div> </div> -- GitLab