In rails, I could restrict certain attribute to be unique within scope but pass on nil or blank. How could I ensure uniqueness but pass on certain value?
I encrypted an attribute, so it's not nil anymore. But I do allow nil for this attribute in the model.
Aucun commentaire:
Enregistrer un commentaire