From 09edfc7c0c354b90df1bd9dd7329e71caef54e55 Mon Sep 17 00:00:00 2001 From: yanxd Date: Thu, 12 Jun 2014 15:20:14 +0800 Subject: [PATCH] cache test --- app/views/welcome/index.html.erb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index ca99f33dc..483dbfc02 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -52,7 +52,9 @@ <%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %>
+ <% end %>
@@ -84,7 +86,9 @@

用户动态

<%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %>
- <% find_all_activities.each do |event| %> + <%activities = find_all_activities%> + <% cache activities do %> + <% activities.each do |event| %>
  • <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %> @@ -96,12 +100,14 @@
  • <% end %> + <% end %>