Browse files

Update lib/socialization/stores/redis/base.rb

injected block needs to return the memo
  • Loading branch information...
1 parent b0ed9f8 commit 5281cbbd57470087c7718127d4ea0584284224b2 @AlainPilon AlainPilon 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 5281cbb

Please sign in to comment.