diff options
author | francis <francis> | 2009-07-01 11:07:32 +0000 |
---|---|---|
committer | francis <francis> | 2009-07-01 11:07:32 +0000 |
commit | e22485d6d3969d1f078b037b170ec009f33dc58c (patch) | |
tree | b8277f0932d9ce1432310a14ef298b829b846384 /lib | |
parent | a4f376b6cfb81dbd7c1cb02bb382c7348bd6f4fc (diff) |
Forgot to commit.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/activesupport_cache_extensions.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/activesupport_cache_extensions.rb b/lib/activesupport_cache_extensions.rb new file mode 100644 index 000000000..f77089fa0 --- /dev/null +++ b/lib/activesupport_cache_extensions.rb @@ -0,0 +1,23 @@ +# lib/activesupport_cache_extensions.rb: +# Extensions / fixes to ActiveSupport::Cache +# +# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved. +# Email: francis@mysociety.org; WWW: http://www.mysociety.org/ +# +# $Id: activesupport_cache_extensions.rb,v 1.1 2009-07-01 11:07:32 francis Exp $ + +# Monkeypatch! + +module ActiveSupport + module Cache + class FileStore < Store + # We don't add the ".cache" file extension, as we want things like + # .jpg files made by pdf2html to be picked up and rendered if + # present. + def real_file_path(name) + '%s/%s' % [@cache_path, name.gsub('?', '.').gsub(':', '.')] + end + end + end +end + |