You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ohm-...@googlegroups.com
I was wondering how to select a random member of a set using ohm. For example, I have two models:
class Event < Ohm::Model attribute :name set :participants, Person end
class Person < Ohm::Model attribute :name end
an event has a set of participants. I want to be able to randomly pick one participant. How should it be done? Is there a method similar to redis srandmember? It's important to have some randomness in picking a member from a set.