Skip to content

Commit 272acaf

Browse files
committed
Fix raw cache issue.
1 parent a27f09b commit 272acaf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/controllers/topics_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def show
8282
drop_breadcrumb("#{@node.try(:name)}", node_topics_path(@node.try(:id)))
8383
drop_breadcrumb t("topics.read_topic")
8484

85-
fresh_when(:etag => [@topic,@has_followed,@has_favorited,@replies,@node])
85+
fresh_when(:etag => [@topic,@has_followed,@has_favorited,@replies,@node,@show_raw])
8686
end
8787

8888
def new

app/views/topics/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
共收到 <b><%= @topic.replies_count %></b> 条回复
7070
</div>
7171
<div class="items">
72-
<%= cache([@topic,params[:page]]) do %>
72+
<%= cache([@topic,params[:page],"raw:#{@show_raw}"]) do %>
7373
<%= render :partial => "replies/reply", :collection => @replies %>
7474
<% end %>
7575
</div>

0 commit comments

Comments
 (0)