Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bug in redis-rb - smembers can return a string, rather than an array
  • Loading branch information
maccman committed Apr 28, 2010
1 parent 10f68be commit e105b7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@ test.rb
redis_test.rb
pkg
lib/supermodel/cassandra.rb
*.gem
2 changes: 1 addition & 1 deletion lib/supermodel/redis.rb
Expand Up @@ -69,7 +69,7 @@ def delete_all

def find_by_attribute(key, value)
item_ids = redis.smembers(redis_key(key, value.to_s))
item_id = item_ids.first
item_id = Array(item_ids).first
item_id && existing(:id => item_id)
end

Expand Down

0 comments on commit e105b7f

Please sign in to comment.