I've this validation in a model
validates_uniqueness_of :name
I created a new object with a default name and I save it without problems. After, I destroyed it and when I want to save a new object with the same name I have the following error:
ActiveRecord::RecordInvalid: Validation failed: Name has already been taken
I'm using Rails 3.0.20
Any ideas?
Thanks!
Aucun commentaire:
Enregistrer un commentaire