lib/blendris/model.rb in blendris-1.1 vs lib/blendris/model.rb in blendris-1.2
- old
+ new
@@ -83,9 +83,15 @@
blocks.each do |block|
self.instance_exec symbol.to_s, &block
end
end
+ def destroy
+ self.class.redis_symbols.keys.each { |key| self[key].clear }
+ redis.srem self.class.index_key, key
+ redis.del key
+ end
+
class << self
include RedisAccessor
include Enumerable