]> source.dussan.org Git - redmine.git/commitdiff
Prevents one query per tracker.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 2 Nov 2014 21:16:12 +0000 (21:16 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 2 Nov 2014 21:16:12 +0000 (21:16 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13543 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/_form.html.erb

index 7828bc1b4f1ce361215f8e8ffb9bdc1bfd53abf2..a670a03b6ae4649871bd1513a0f322c1341c81dd 100644 (file)
@@ -45,7 +45,7 @@
 <fieldset class="box tabular" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend>
 <% @trackers.each do |tracker| %>
     <label class="floating">
-    <%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.include?(tracker), :id => nil %>
+    <%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.to_a.include?(tracker), :id => nil %>
     <%=h tracker %>
     </label>
 <% end %>