I have model called Slot, which has a start_on and end_on, both of which
A Team has_many Slots.
The two things I’m looking to do are:
- Ensure that newly created slots dont overlap any existing ones for a
- Quickly retrieve the ‘current’ slot given a Team and Time.now.
I can figure out how to do these two operations with a bit of grunting
and sweaty brute force, but I’m wondering if anyone with a bit more
ActiveRecord-fu can help me out with any shortcuts to something more
Any help appreciated.