Permalink
Browse files

Forgot to commit.

  • Loading branch information...
1 parent 893951d commit b054ac72d07c003289b7c7cd4e5d5cf4617728a4 francis committed Jul 1, 2009
Showing with 23 additions and 0 deletions.
  1. +23 −0 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
+

0 comments on commit b054ac7

Please sign in to comment.