Topic: Ignoring validates_uniqueness of when destroying a record

Hi there,

Is there any simple way of ignoring validates_uniqueness_of (and validates_presense_of) exceptions when calling .destroy() ?
The validations are required for creates and updates but not when deleting historical data.

thanks.

Re: Ignoring validates_uniqueness of when destroying a record

Look at Rails guides to understand at which moment the validations happen:

The following methods trigger validations, and will save the object to the database only if the object is valid:

    create
    create!
    save
    save!
    update
    update_attributes
    update_attributes!

So as you see, no validations are triggered when calling a destroy method.