Suppose we have something of class
@physician.availabilities.class
=> Availability::ActiveRecord_Associations_CollectionProxy
@physician.availabilities.length
=> 72
How can we randomly sample records from this object?
E.g. this looks promising
@physician.availabilities.sample(5)
execept that
@physician.availabilities.sample(5).class
=> Array
whereas I want to retrain an ActiveRecord object (so I can .save the random sample but not the others)