Skip to content
Browse files

Merge pull request #17 from AlainPilon/patch-2

Update lib/socialization/stores/redis/base.rb
  • Loading branch information...
2 parents b0ed9f8 + 5281cbb commit 1f856c13c0cc3419d83b9f5bf1504a0cdf9c544e @cmer committed Aug 15, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/socialization/stores/redis/base.rb
View
2 lib/socialization/stores/redis/base.rb
@@ -8,6 +8,7 @@ def actors(victim, klass, options = {})
if options[:pluck]
Socialization.redis.smembers(generate_forward_key(victim)).inject([]) do |result, element|
result << element.match(/\:(\d+)$/)[1] if element.match(/^#{klass}\:/)
+ result
end
else
actors_relation(victim, klass, options).all
@@ -28,6 +29,7 @@ def victims(actor, klass, options = {})
if options[:pluck]
Socialization.redis.smembers(generate_backward_key(actor)).inject([]) do |result, element|
result << element.match(/\:(\d+)$/)[1] if element.match(/^#{klass}\:/)
+ result
end
else
victims_relation(actor, klass, options).all

0 comments on commit 1f856c1

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