Fix deprecated finder method in calendar block

pull/6827/head
Jonas Heinrich 9 years ago
parent 7be672b6ff
commit 9c3a234f73
  1. 5
      app/views/my_projects_overviews/blocks/_calendar.html.erb

@ -26,8 +26,7 @@ See doc/COPYRIGHT.md for more details.
<% end %> <% end %>
<% calendar = Redmine::Helpers::Calendar.new(Date.today, current_language, :week) <% calendar = Redmine::Helpers::Calendar.new(Date.today, current_language, :week)
calendar.events = WorkPackage.visible.find :all, 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)
: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], .includes(:project, :type, :priority, :assigned_to) unless @user.projects.empty? %>
:include => [:project, :type, :priority, :assigned_to] unless @user.projects.empty? %>
<%= render :partial => 'common/calendar', :locals => {:calendar => calendar } %> <%= render :partial => 'common/calendar', :locals => {:calendar => calendar } %>

Loading…
Cancel
Save