From abed8c9111d12a0c327b4b902a94d3c61651b4d5 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 3 Mar 2021 15:04:52 +0100 Subject: [PATCH] suite date --- 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 70d5bc3..0a55d4a 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 >= ? and start_at <= ? ", Date.today.beginning_of_year.beginning_of_year, Date.today.beginning_of_year.end_of_year).all.each do |m_event| + -MEvent.joins(:organisateur).where(:organisateurs => {:public => true}).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