Skip to content

Instantly share code, notes, and snippets.

@erik-megarad
Created December 4, 2010 20:48
Show Gist options
  • Save erik-megarad/728471 to your computer and use it in GitHub Desktop.
Save erik-megarad/728471 to your computer and use it in GitHub Desktop.
module DataMapper
module Adapters
class RedisAdapter < AbstractAdapter
def find_matches(query, operand)
@redis.smembers("#{query.model.to_s.downcase}:#{operand.subject.name}:#{encode(operand.value)}").collect{|k| k.gsub(/\[|\]/, "")}
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment