From 3c5c557e0839cfd18720e8dbd3cd2e76f8f209f8 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Mon, 22 Jun 2015 16:54:46 -0300 Subject: [PATCH] Fix block cache key --- lib/pairwise_plugin/questions_group_list_block.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pairwise_plugin/questions_group_list_block.rb b/lib/pairwise_plugin/questions_group_list_block.rb index 887e52b..9ba51a9 100644 --- a/lib/pairwise_plugin/questions_group_list_block.rb +++ b/lib/pairwise_plugin/questions_group_list_block.rb @@ -125,7 +125,7 @@ class PairwisePlugin::QuestionsGroupListBlock < Block end def cache_key_with_person(language = 'en', user=nil) - cache_key_without_person + (user && created_by == user ? "-#{user.identifier}" : '') + cache_key_without_person + (user.present? ? "-#{user.identifier}" : '') end alias_method_chain :cache_key, :person -- libgit2 0.21.2