user_activities 加cache

This commit is contained in:
alan 2016-03-25 10:27:28 +08:00
parent 357c60d42e
commit 04b4823ac2
1 changed files with 3 additions and 0 deletions

View File

@ -56,6 +56,7 @@
</script>
<% unless user_activity.act_type == "ProjectCreateInfo" %>
<% act= user_activity.act %>
<% cache (user_activity) do %>
<% case user_activity.container_type.to_s %>
<% when 'Course' %>
<% if act %>
@ -100,9 +101,11 @@
<% end %>
<% end %>
<% end %>
<% end %>
<% else %>
<%= render :partial => 'project_create', :locals => {:activity => user_activity,:user_activity_id =>user_activity.id} %>
<% end %>
<% end %>
<% end %>