cached导致的个人项目列表问题

This commit is contained in:
guange 2015-05-29 18:42:22 +08:00
parent 21a143651a
commit 0eace6e598
1 changed files with 1 additions and 3 deletions

View File

@ -2,13 +2,11 @@
<li id="project_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> <li id="project_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name} %> <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name} %>
<ul class="project_sub_menu" style="top:<%= hasCourse ? 35 : 0 %>px;"> <ul class="project_sub_menu" style="top:<%= hasCourse ? 35 : 0 %>px;">
<% cache User.current.projects.count do%>
<% User.current.projects.each do |project| %> <% User.current.projects.each do |project| %>
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=project.name%>"> <li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=project.name%>">
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name } %> <%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name } %>
</li> </li>
<% end %> <% end %>
<% end %>
</ul> </ul>
</li> </li>
<% end %> <% end %>