Sha256: f31aa26bf9a1a098623082196e9b69cca4a1c884c899be7c0bdeab5bbf5fde7d

Contents?: true

Size: 527 Bytes

Versions: 6

Compression:

Stored size: 527 Bytes

Contents

module RedisSnippets
  module Util
    # If multi_site is true the symbol returned will have the key returned with a prefix.
    # This prefix is defined in your application using the redis_snippet_site_key method.
    # redis_snippet_site_key should simply return a unique string per site. For instance
    # it could be the domain of the site.
    def snippet_key(key)
      s = RedisSnippets::Engine.config.redis_snippets[:multi_site] ? redis_snippet_site_key + ':' : ''
      s << key.to_s
      s.to_sym
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
redis_snippets-1.0.5 lib/redis_snippets/util.rb
redis_snippets-1.0.4 lib/redis_snippets/util.rb
redis_snippets-1.0.3 lib/redis_snippets/util.rb
redis_snippets-1.0.2 lib/redis_snippets/util.rb
redis_snippets-1.0.1 lib/redis_snippets/util.rb
redis_snippets-1.0.0 lib/redis_snippets/util.rb