From 2e9ae1c4d17f81c9a651a781ced08ac01850e201 Mon Sep 17 00:00:00 2001 From: Eric Oligney Date: Wed, 1 Feb 2017 12:59:41 -0500 Subject: [PATCH] #348: resolves errors when passing a symbol with underscores. --- app/helpers/cache_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/cache_helper.rb b/app/helpers/cache_helper.rb index b117dad5..09dddfcb 100644 --- a/app/helpers/cache_helper.rb +++ b/app/helpers/cache_helper.rb @@ -6,7 +6,7 @@ def cache_keys_for_all(*klass_names) end def cache_key_for_all(klass_name) - klass = klass_name.to_s.singularize.capitalize.constantize + klass = klass_name.to_s.singularize.camelize.constantize count = klass.count max_updated_at = klass.maximum(:updated_at).try(:utc).try(:to_s, :number) page = params[:page]