class Kumolus::ActiveRecord::Validations::AssociationNotSoftDestroyedValidator
Public Instance Methods
validate_each(record, attribute, value)
click to toggle source
# File lib/kumolus/paranoia.rb, line 320 def validate_each(record, attribute, value) # if association is soft destroyed, add an error if value.present? && value.deleted? record.errors[attribute] << 'has been soft-deleted' end end