Forum: Rails Engines [LoginEngine] making email editable but still unique

34f5b045aec62235c17458650ea75353?d=identicon&s=25 Steve Koppelman (hatless)
on 2006-12-20 23:34
Despite what LoginEngine wants me to do in an ideal world, I want my
users to be able to change their email address, but I still want to
enforce uniqueness.

When I throw caution to the wind and add 'email' to :changeable_fields,
I can see why there's a warning against doing this, and it's not because
cats and dogs lie together. Instead, on updates, the
"validates_uniqueness_of :email" declaration in my model is ignored. All
of my other validations, including some I've added myself in the same
file are being called.

I've tied looking through the source. I've tried -- in my overridden
do_edit() methods -- to explicitly call #save_with_validation. It makes
no difference. Uniqueness is not being enforced.

Any thoughts?
This topic is locked and can not be replied to.