I have the following check:
class Event < ActiveRecord::Base attr_accessible :starts, :ends validates :no_multi_day_events private def no_multi_day_events if (ends.day != starts.day) errors.add(:ends, "No multi-day events") end end end
However, when I try to load a page with this text, I get an error: You need to supply at least one validation
How to check?
source share