From da4967b3d0e636fdf29dd5e5b041f3d453afbf6f Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Tue, 3 Mar 2020 14:25:28 +0100 Subject: [PATCH] Fix markup --- app/controllers/dashboard/calendars_controller.rb | 8 ++++---- app/controllers/dashboard/current_tasks_controller.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/dashboard/calendars_controller.rb b/app/controllers/dashboard/calendars_controller.rb index 157ec4f8b..0282e2814 100644 --- a/app/controllers/dashboard/calendars_controller.rb +++ b/app/controllers/dashboard/calendars_controller.rb @@ -10,8 +10,8 @@ module Dashboard end_date = date.at_end_of_month.utc + 14.days due_dates = current_user.my_modules.active.uncomplete .joins(experiment: :project) - .where('experiments.archived': false) - .where('projects.archived': false) + .where(experiments: {archived: false}) + .where(projects: {archived: false}) .where('my_modules.due_date > ? AND my_modules.due_date < ?', start_date, end_date) .joins(:protocols).where('protocols.team_id = ?', current_team.id) .pluck(:due_date) @@ -22,8 +22,8 @@ module Dashboard date = DateTime.parse(params[:date]).utc my_modules = current_user.my_modules.active.uncomplete .joins(experiment: :project) - .where('experiments.archived': false) - .where('projects.archived': false) + .where(experiments: {archived: false}) + .where(projects: {archived: false}) .where('DATE(my_modules.due_date) = DATE(?)', date) .where('projects.team_id = ?', current_team.id) .my_modules_list_partial diff --git a/app/controllers/dashboard/current_tasks_controller.rb b/app/controllers/dashboard/current_tasks_controller.rb index 0dc6cc70e..bb635a7eb 100644 --- a/app/controllers/dashboard/current_tasks_controller.rb +++ b/app/controllers/dashboard/current_tasks_controller.rb @@ -18,8 +18,8 @@ module Dashboard end tasks = tasks.joins(experiment: :project) - .where('experiments.archived': false) - .where('projects.archived': false) + .where(experiments: {archived: false}) + .where(projects: {archived: false}) if task_filters[:mode] == 'assigned' tasks = tasks.left_outer_joins(:user_my_modules).where('user_my_modules.user_id': current_user.id)