lib/action_policy/railtie.rb in action_policy-0.2.3 vs lib/action_policy/railtie.rb in action_policy-0.2.4

- old
+ new

@@ -28,14 +28,15 @@ # Define whether to cache namespaced policy resolution # result (e.g. in controllers). # Enabled only in production by default. attr_accessor :namespace_cache_enabled - def cache_store=(store, *args) - if store.is_a?(Symbol) - store = ActiveSupport::Cache.lookup_store( - store, *args - ) + def cache_store=(store) + # Handle both: + # store = :memory + # store = :mem_cache, ENV['MEMCACHE'] + if store.is_a?(Symbol) || store.is_a?(Array) + store = ActiveSupport::Cache.lookup_store(store) end ActionPolicy.cache_store = store end end