Skip to content

Instantly share code, notes, and snippets.

@eka
Last active August 29, 2015 13:57
Show Gist options
  • Save eka/9697516 to your computer and use it in GitHub Desktop.
Save eka/9697516 to your computer and use it in GitHub Desktop.
class User < Ohm::Model
attribute :name
index :name
def self.fetch_by_field(field, values)
keys = to_indices(field, values)
command = Ohm::Command.new(:sunionstore, *keys)
Ohm::MultiSet.new(key, self, command)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment