Skip to content
Browse files

Remove caching on Entities#show for the time being

  • Loading branch information...
1 parent 06f14a5 commit 8703b320137fbefbf8cf7976be9c6ef4596b3ab6 @andey committed Jan 27, 2013
Showing with 31 additions and 33 deletions.
  1. +31 −33 app/views/entities/show.html.erb
View
64 app/views/entities/show.html.erb
@@ -1,15 +1,31 @@
<% content_for :title, @entity.name + " :: BestofAMA" %>
-<% cache(@entity) do %>
- <% if @entity.avatar? %>
- <%= render 'show-advanced' %>
- <% else %>
- <%= render 'show-basic' %>
+<% if @entity.avatar? %>
+ <%= render 'show-advanced' %>
+<% else %>
+ <%= render 'show-basic' %>
+<% end %>
+<hr/>
+<div class="row">
+ <div class="span12">
+ <% @amas.each do |a| %>
+ <div class="row">
+ <div class="span1 ama-karma-meter-small">
+ <%= karma_meter(a.karma).html_safe %>
+ </div>
+ <div class="span11">
+ <h4><%= link_to a.title.html_safe, ama_path(a) %></h4>
+
+ <p class="muted">
+ <b>Comments:</b> <%= a.comments %> |
+ <b>Responses:</b> <%= a.responses %> |
+ <b>Date:</b> <%= a.date %>
+ </p>
+ </div>
+ </div>
<% end %>
- <hr/>
- <div class="row">
- <div class="span12">
- <% @amas.each do |a| %>
+ <% @entity.users.group(:id).each do |u| %>
+ <% u.amas_participated.each do |a| %>
<div class="row">
<div class="span1 ama-karma-meter-small">
<%= karma_meter(a.karma).html_safe %>
@@ -25,28 +41,10 @@
</div>
</div>
<% end %>
- <% @entity.users.group(:id).each do |u| %>
- <% u.amas_participated.each do |a| %>
- <div class="row">
- <div class="span1 ama-karma-meter-small">
- <%= karma_meter(a.karma).html_safe %>
- </div>
- <div class="span11">
- <h4><%= link_to a.title.html_safe, ama_path(a) %></h4>
-
- <p class="muted">
- <b>Comments:</b> <%= a.comments %> |
- <b>Responses:</b> <%= a.responses %> |
- <b>Date:</b> <%= a.date %>
- </p>
- </div>
- </div>
- <% end %>
- <% end %>
- </div>
+ <% end %>
+ </div>
- <% if current_user_session %>
- <%= render 'edit' %>
- <% end %>
- </div>
-<% end %>
+ <% if current_user_session %>
+ <%= render 'edit' %>
+ <% end %>
+</div>

0 comments on commit 8703b32

Please sign in to comment.
Something went wrong with that request. Please try again.