class OpenvasCli::ImmutableChildrenValidator
Public Instance Methods
validate(record)
click to toggle source
# File lib/openvas-cli/immutable_children_validator.rb, line 5 def validate(record) if record.id record.errors[:base] << "Configuration cannot change after creation." \ if record.config_id_changed? record.errors[:base] << "Target cannot change after creation." \ if record.target_id_changed? || record.target.changed? end end