lib/cacheable.rb in simple_cacheable-1.2.0 vs lib/cacheable.rb in simple_cacheable-1.2.1

- old
+ new

@@ -1,5 +1,7 @@ +require 'uri' + module Cacheable def self.included(base) base.class_eval do class <<self def model_cache(&block) @@ -98,10 +100,10 @@ end end end def attribute_cache_key(attribute, value) - "#{name.tableize}/attribute/#{attribute}/#{value}" + "#{name.tableize}/attribute/#{attribute}/#{URI.escape(value)}" end end end end