search for: samples_date

Displaying 1 result from an estimated 1 matches for "samples_date".

Did you mean: sample_date
2006 Sep 11
0
validates_uniqueness_of :number by the year in a DateTime column
Hello all, I have a class Ticket < ActiveRecord::Base which has a property called :number and a property called :samples_date. a ticket number has to be unique over the same year. the year is given by the property called :samples_date I''m trying to validate the uniqueness of :number based on the year from the :samples_date property. i would like to specify the condition somehow in the :scope of the validates_...