Permalink
Browse files

Add redis options

  • Loading branch information...
1 parent 5533a02 commit 8ff09f28e0e1dd7d5758d91bb2efda7c2c113f50 @maccman maccman committed Jul 4, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/supermodel/redis.rb
View
6 lib/supermodel/redis.rb
@@ -5,8 +5,12 @@ def self.extended(base)
base.class_eval do
class_inheritable_array :indexed_attributes
self.indexed_attributes = []
+
class_inheritable_array :serialized_attributes
self.serialized_attributes = []
+
+ class_inheritable_hash :redis_options
+ self.redis_options = {}
end
end
@@ -19,7 +23,7 @@ def namespace=(namespace)
end
def redis
- @redis ||= ::Redis.new
+ @redis ||= ::Redis.new(redis_options)
end
def indexes(*indexes)

0 comments on commit 8ff09f2

Please sign in to comment.