From f78cb5583f77952aa35e063a660a11aad5f8de7f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 27 Jan 2012 20:43:49 +0100 Subject: Inline the prefix assignment so it doesnt look so daft --- activesupport/lib/active_support/cache.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/cache.rb') diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 5afc92059c..42b11b1daf 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -77,8 +77,7 @@ module ActiveSupport def expand_cache_key(key, namespace = nil) expanded_cache_key = namespace ? "#{namespace}/" : "" - prefix = ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"] - if prefix + if prefix = ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"] expanded_cache_key << "#{prefix}/" end -- cgit v1.2.3