Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add redis options

  • Loading branch information...
commit 8ff09f28e0e1dd7d5758d91bb2efda7c2c113f50 1 parent 5533a02
Alex MacCaw maccman authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 lib/supermodel/redis.rb
6 lib/supermodel/redis.rb
@@ -5,8 +5,12 @@ def self.extended(base)
5 5 base.class_eval do
6 6 class_inheritable_array :indexed_attributes
7 7 self.indexed_attributes = []
  8 +
8 9 class_inheritable_array :serialized_attributes
9 10 self.serialized_attributes = []
  11 +
  12 + class_inheritable_hash :redis_options
  13 + self.redis_options = {}
10 14 end
11 15 end
12 16
@@ -19,7 +23,7 @@ def namespace=(namespace)
19 23 end
20 24
21 25 def redis
22   - @redis ||= ::Redis.new
  26 + @redis ||= ::Redis.new(redis_options)
23 27 end
24 28
25 29 def indexes(*indexes)

0 comments on commit 8ff09f2

Please sign in to comment.
Something went wrong with that request. Please try again.