From f8bfa83ae44f34297af021c2ea45bde05ddc455f Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 13 Jun 2014 08:35:37 +0800 Subject: [PATCH] move cache --- app/views/welcome/index.html.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 483dbfc02..a9d7e994a 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -53,8 +53,8 @@
- <% end %>
@@ -87,8 +87,8 @@ <%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %>
<%activities = find_all_activities%> - <% cache activities do %> <% activities.each do |event| %> + <% cache "welcome_index_userActivity_ul_#{event}_li" do %>
  • <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %> @@ -99,8 +99,8 @@

    <%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前     <%= show_event_reply event %>

  • - <% end %> <% end %> + <% end %>
    @@ -118,8 +118,8 @@ <% end %>
    <% topics = find_new_forum_topics(7) %> - <% cache topics do %> <% topics.each do |topic|%> + <% cache "welcome_index_memosActivity_ul_#{topic}_li" do %>
  • <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %> @@ -139,8 +139,8 @@
  • - <% end %> <% end %> + <% end %>