1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Inline the prefix assignment so it doesnt look so daft

This commit is contained in:
David Heinemeier Hansson 2012-01-27 20:43:49 +01:00
parent 83dbef6074
commit b495a8dba8

View file

@ -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