From b0b8d4126dcfb075b8bb7b3e9f75b6cd27eff11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 14 Sep 2015 18:00:26 +0200 Subject: [PATCH] adds cache to highlights --- app/views/debates/show.html.erb | 1 + app/views/welcome/highlights.html.erb | 30 ++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index a86efed99..70f78ccf1 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -81,4 +81,5 @@ <% end %> + <%= render "comments" %> diff --git a/app/views/welcome/highlights.html.erb b/app/views/welcome/highlights.html.erb index 647237fee..167f3a2e9 100644 --- a/app/views/welcome/highlights.html.erb +++ b/app/views/welcome/highlights.html.erb @@ -1,19 +1,21 @@ -
-
-
+<% cache [locale_and_user_status, @list, @debate_votes, @proposal_votes, @paginator.current_page, @paginator.total_pages] do %> +
+
+
-
+
-
-

- <%= t('welcome.signed_in_home_title') %> -

+
+

+ <%= t('welcome.signed_in_home_title') %> +

+
+ + <%= render @list %> + <%= paginate @paginator %>
- - <%= render @list %> - <%= paginate @paginator %>
-
-
-
\ No newline at end of file +
+
+<% end %> \ No newline at end of file