From 69cb070ce233da4d0d38dc40dfe2f8cad5bbf6a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 7 Sep 2015 13:18:30 +0200 Subject: [PATCH] adds user's votes info to cache keys --- app/views/debates/_debate.html.erb | 2 +- app/views/debates/show.html.erb | 2 +- app/views/welcome/_featured_debate.html.erb | 2 +- app/views/welcome/index.html.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/debates/_debate.html.erb b/app/views/debates/_debate.html.erb index fd9304c3d..49d202cc8 100644 --- a/app/views/debates/_debate.html.erb +++ b/app/views/debates/_debate.html.erb @@ -1,4 +1,4 @@ -<% cache [locale_and_user_status, debate] do %> +<% cache [locale_and_user_status, debate, @debate_votes[debate.id]] do %>
diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index 28d514817..fbcbe6b10 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -1,4 +1,4 @@ -<% cache [locale_and_user_status(@debate), @debate, @debate.author, Flag.flagged?(current_user, @debate)] do %> +<% cache [locale_and_user_status(@debate), @debate, @debate.author, Flag.flagged?(current_user, @debate), @debate_votes] do %>
diff --git a/app/views/welcome/_featured_debate.html.erb b/app/views/welcome/_featured_debate.html.erb index b364f875c..0990132dc 100644 --- a/app/views/welcome/_featured_debate.html.erb +++ b/app/views/welcome/_featured_debate.html.erb @@ -1,4 +1,4 @@ -<% cache [locale_and_user_status, featured_debate, 'featured'] do %> +<% cache [locale_and_user_status, featured_debate, @debate_votes[featured_debate.id],'featured'] do %>
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index fbd2881f3..705c9ad4a 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -1,4 +1,4 @@ -<% cache [locale_and_user_status, @featured_debates, 'featured'] do %> +<% cache [locale_and_user_status, @featured_debates, @debate_votes, 'featured'] do %>