% if !activities.blank? -%> <% activities.each do |activity| -%> <% cache ("activities/#{I18n.locale}/#{activity.id}") do -%> <%= render( :partial => "activity_templates/#{activity.partial}", :locals => {:activity => activity}) %>