validates_overlap
validates_overlap copied to clipboard
Gem for Rails 3 and 4, that helps validate overlap
```ruby # foo.rb class Foo < ApplicationRecord enum day: [:sunday, :monday, :tuesday, :wednesday, :thursday, :friday, :saturday] validates :start_time, :end_time, overlap: { scope: [:day, :another_column] } end ``` Here's what I...
I'm seeing an error that is intriguing me, doesn't seem to happen all the time. I have my overlap conditions defined as: ```ruby scope :active, (-> { where(deleted: false, available:...
It seems like the field containing the from date (start date) has to be present or the validation for overlapping dates will be fired. I assume this is a bug...