aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-20 00:25:41 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-20 00:25:41 -0700
commitf47c81ff37afb5e5340b6f2cb47a5bb76b94f5c0 (patch)
tree58ac8eac933f229a64b232fff93566bd38a83194 /activesupport/lib/active_support
parent72f93b581f1d1a7496ccebbd90578714c171c5a5 (diff)
downloadrails-f47c81ff37afb5e5340b6f2cb47a5bb76b94f5c0.tar.gz
rails-f47c81ff37afb5e5340b6f2cb47a5bb76b94f5c0.tar.bz2
rails-f47c81ff37afb5e5340b6f2cb47a5bb76b94f5c0.zip
Fall back to #to_s for cache key expansion
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/cache.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index 2f1143e610..b8ccd35753 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -19,7 +19,7 @@ module ActiveSupport
def self.expand_cache_key(key, namespace = nil)
expanded_cache_key = namespace ? "#{namespace}/" : ""
-
+
if ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]
expanded_cache_key << "#{ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]}/"
end
@@ -31,6 +31,8 @@ module ActiveSupport
key.collect { |element| expand_cache_key(element) }.to_param
when key.respond_to?(:to_param)
key.to_param
+ else
+ key.to_s
end
expanded_cache_key