diff --git a/lib/flop/repository/redis.rb b/lib/flop/repository/redis.rb index 6f0d253..c56872b 100644 --- a/lib/flop/repository/redis.rb +++ b/lib/flop/repository/redis.rb @@ -17,7 +17,11 @@ module Flop private def key(name) - [@namespace, name].join(':') + [namespace, name].flatten.join(':') + end + + def namespace + @namespace.is_a?(Proc) ? @namespace.call : @namespace end end end