module CacheWithLocale::Helpers
Public Instance Methods
cache(key, options = {}) { |block| ... }
click to toggle source
Calls superclass method
# File lib/cache_with_locale.rb, line 5 def cache(key, options = {}, &block) super(cache_with_locale_compose_key(key), options) do yield(block) end end
Private Instance Methods
cache_with_locale_compose_key(key)
click to toggle source
# File lib/cache_with_locale.rb, line 12 def cache_with_locale_compose_key(key) Array.wrap(key) + [I18n.locale.to_s] end