From 7c71bcda55adbdf52f7c5cd447b8a517d2d4d6fb Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 18 Nov 2020 10:22:26 +0100 Subject: [PATCH] date de roulage --- app/views/public/menu_items/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/public/menu_items/index.html.haml b/app/views/public/menu_items/index.html.haml index ee9bb98..fcfa6bf 100644 --- a/app/views/public/menu_items/index.html.haml +++ b/app/views/public/menu_items/index.html.haml @@ -41,7 +41,7 @@ .col-xs-12.col-md-6.col-lg-3 %span.chiffre -r = 0 - -MEvent.where("start_at > ?", Date.today.beginning_of_year.beginning_of_year).all.each do |m_event| + -MEvent.where("start_at >= ? and start_at <= ? ", Date.today.beginning_of_year.beginning_of_year, Date.today.beginning_of_year.end_of_year).all.each do |m_event| -r+=(m_event.end_at - m_event.start_at ).to_i / (24 * 60 * 60) +1 =r %span.label-chiffre Dates