----- Original Message -----
From: “Kevin O.” firstname.lastname@example.org
Sent: Tuesday, January 10, 2006 10:38 PM
Subject: [Rails] Re: validator to ensure two fields are different?
this method requires an enumerable object for :in. A symbol (:username)
is not enumerable, an array is.
validates_exclusion_of :password, :in=>[username]
and that errors with “undefined local variable”
I also tried
validates_exclusion_of :password, :in=>[:username]
and that does not error but does not catch the fields being equal.
If you have any other suggestions that would be great!