From 9c3a234f738e674ec9fa7c436f9be203472afee9 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 29 Sep 2015 17:41:46 +0200 Subject: [PATCH] Fix deprecated finder method in calendar block --- app/views/my_projects_overviews/blocks/_calendar.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/my_projects_overviews/blocks/_calendar.html.erb b/app/views/my_projects_overviews/blocks/_calendar.html.erb index 3d382f0280..ab8bc37a4a 100644 --- a/app/views/my_projects_overviews/blocks/_calendar.html.erb +++ b/app/views/my_projects_overviews/blocks/_calendar.html.erb @@ -26,8 +26,7 @@ See doc/COPYRIGHT.md for more details. <% end %> <% calendar = Redmine::Helpers::Calendar.new(Date.today, current_language, :week) - calendar.events = WorkPackage.visible.find :all, - :conditions => ["#{WorkPackage.table_name}.project_id in (#{@user.projects.collect{|m| m.id}.join(',')}) AND ((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", calendar.startdt, calendar.enddt, calendar.startdt, calendar.enddt], - :include => [:project, :type, :priority, :assigned_to] unless @user.projects.empty? %> + calendar.events = WorkPackage.visible.where("#{WorkPackage.table_name}.project_id in (#{@user.projects.collect{|m| m.id}.join(',')}) AND ((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", calendar.startdt, calendar.enddt, calendar.startdt, calendar.enddt) + .includes(:project, :type, :priority, :assigned_to) unless @user.projects.empty? %> <%= render :partial => 'common/calendar', :locals => {:calendar => calendar } %>