From 064472d452c59124ad7aa6358d138cb42ea23bde Mon Sep 17 00:00:00 2001 From: Christoph Marzell Date: Sun, 8 Feb 2026 09:39:27 +0100 Subject: [PATCH] add dashboard --- app/controllers/dashboards_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/dashboards_controller.rb b/app/controllers/dashboards_controller.rb index 86ddff8..4742fd3 100644 --- a/app/controllers/dashboards_controller.rb +++ b/app/controllers/dashboards_controller.rb @@ -34,6 +34,9 @@ class DashboardsController < ApplicationController 0 end - @last_entry = current_user.entries.order(date: :desc).first + @last_entry = current_user.entries + .where('date <= ?', Date.today) + .order(date: :desc) + .first end end