Date validation :before -1 day

I really liked the tool but I have got stuck in one case. I am in urgent
need of your help regarding

validates_date :sale_start, :before => :sale_end,
:after => Proc.new { -1.day.from_now.to_date }

validates_date :sale_end, :after => [:sale_start ,
Proc.new {
-1.day.from_now.to_date }],

This is Okay but there may be the same date as of sale_end. Means a sale
can be for a single day, in that case sale_start and sale_end both
fields may have the same date but this syntax or :after property does
not allow me to do so. It accepts only one day after the sale_start
date. So will you please suggest me how can I set it as the same day.

Your help will be appreciated.

Thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs