cache obj

This commit is contained in:
yanxd 2014-06-13 16:13:32 +08:00
parent 93d13c8867
commit 07e4d40d44
1 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@
<ul class="d-p-projectlist">
<% projects = find_miracle_project(10, 3) %>
<% projects.map do |project| %>
<% cache "welcome_index_hotProject_ul_#{project}_li" do %>
<% cache "welcome_index_hotProject_ul_project_#{project.id}_li" do %>
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
<div style="float: left;">
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
@ -88,7 +88,7 @@
<div class="user-message-box-list" style="margin-top: 10px;">
<%activities = find_all_activities%>
<% activities.each do |event| %>
<% cache "welcome_index_userActivity_ul_#{event}_li" do %>
<% cache "welcome_index_userActivity_ul_event_#{event.class}_#{event.id}_li" do %>
<li style="display: block;height:60px; padding-bottom: 4px;">
<div class="inner-right" style="float: left; height: 100%; ">
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
@ -119,7 +119,7 @@
<div class="welcome-box-list-new memo_activity">
<% topics = find_new_forum_topics(7) %>
<% topics.each do |topic|%>
<% cache "welcome_index_memosActivity_ul_#{topic}_li" do %>
<% cache "welcome_index_memosActivity_ul_topic_#{topic.id}_li" do %>
<li class="message-brief-intro">
<div class='memo_title text_nowrap'>
<%= 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 %>