aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2012-01-27 20:43:49 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2012-01-27 20:44:18 +0100
commitb495a8dba8f479dfd43985936bc33369465bdbaf (patch)
treebaa165da2f34908cba8928be6170be7b02834c2e /activesupport/lib
parent83dbef6074269c3eb742c0506476b3679707dedd (diff)
downloadrails-b495a8dba8f479dfd43985936bc33369465bdbaf.tar.gz
rails-b495a8dba8f479dfd43985936bc33369465bdbaf.tar.bz2
rails-b495a8dba8f479dfd43985936bc33369465bdbaf.zip
Inline the prefix assignment so it doesnt look so daft
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/cache.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index 9711ed6f73..26e737e917 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