Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

type matching is now more lenient

  • Loading branch information...
commit d0b315f2770784971a2edd1b7e4d5b62f7327bf8 1 parent fc79d13
@cmer authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/socialization/stores/redis/base.rb
View
7 lib/socialization/stores/redis/base.rb
@@ -83,12 +83,11 @@ def remove_victim_relations(actor)
private
def key_type_to_type_names(klass)
- case klass.name
- when "Socialization::RedisStores::Follow"
+ if klass.name.match(/Follow$/)
['follower', 'followable']
- when "Socialization::RedisStores::Like"
+ elsif klass.name.match(/Like$/)
['liker', 'likeable']
- when "Socialization::RedisStores::Mention"
+ elsif klass.name.match(/Mention$/)
['mentioner', 'mentionable']
else
raise ArgumentError.new("Can't find matching type for #{klass}.")

1 comment on commit d0b315f

@sharp

If save data in redis, how to backup it ?

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