Re: Validation help

François Beausoleil
Wed, 07 Sep 2005 22:15:25 -0000

Silly me !

Adrian Madrid said the following on 2005-09-07 16:36:
> Now that I
> think about it I could do record.send(attr) == record.fieldy
>
> It works! Here''s the final code:
>
> validates_each :fieldx do |record, attr|
>   record.errors.add attr, ''must be different from fieldy''
if
> record.send(attr) == record.fieldy
> end

Yup, after I read your response, I realized my error.  Sorry for the
mixup, and good work on your part :)

Bye !
François