From ce8fc83167ecad467a6d99ca81f20afc71d20325 Mon Sep 17 00:00:00 2001 From: Kaio Magalhaes Date: Sun, 19 May 2024 15:13:31 -0300 Subject: [PATCH] add assignments start/end date filter --- app/controllers/assignments_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/assignments_controller.rb b/app/controllers/assignments_controller.rb index 4af6be8..806e881 100644 --- a/app/controllers/assignments_controller.rb +++ b/app/controllers/assignments_controller.rb @@ -15,7 +15,8 @@ def index assignments_filter[:start_date], assignments_filter[:end_date] ) - @assignments = Assignment.where(requirement: requirements) + @assignments = Assignment.where(requirement: requirements).active_in_period(assignments_filter[:start_date], + assignments_filter[:end_date]) end def show; end