refactor cache
This commit is contained in:
parent
46951f7af9
commit
3b48b3add7
|
@ -68,7 +68,7 @@
|
||||||
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id,:course_activity => 0} %>
|
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id,:course_activity => 0} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when 'News' %>
|
<% when 'News' %>
|
||||||
<% cache [act.id, act.comments.count] do %>
|
<% cache [act, act.comments.count] do %>
|
||||||
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when 'Message'%>
|
<% when 'Message'%>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
<% when 'Project' %>
|
<% when 'Project' %>
|
||||||
<% case user_activity.act_type.to_s %>
|
<% case user_activity.act_type.to_s %>
|
||||||
<% when 'Issue' %>
|
<% when 'Issue' %>
|
||||||
<% cache [act.id, act.journals.count, act.attachments.count] do%>
|
<% cache [act, act.journals.count, act.attachments.count] do%>
|
||||||
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id, :user_id => user_id} %>
|
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id, :user_id => user_id} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when 'Message' %>
|
<% when 'Message' %>
|
||||||
|
|
Loading…
Reference in New Issue