I wanted to validate my form for duplicate entries while creating a new
user . So I added validates_uniqueness_of in the users model. But it
gets applied to the edit user code also.
Since its an edit-user page, it should not validate duplicate records
and should update the existing record.Or say , is should have
validations of it own
I tried adding a validation function check_duplicate in the model and
called it before_create . But that gives errors.
Can anyone please help me for this.
Thanks n Regards