Hi there,
I have some model classes where I’ve tested successful that validation
worked. After some more days of iterations I found that that validation
isn’t working anymore. The validation functions are not even called.
Example:
class Company < ActiveRecord::Base
validates_uniqueness_of :name
validates_numericality_of :money
validates_each :money do |record, attr, value|
record.errors.add( attr, "darf nicht unter 0 sinken.") \
if value < 0.0
end
# more code
That’s not the only class for which the validation isn’t working
anymore. I’ve tested the validation by calling save! on an invalid
object and expected that an exception will be thrown. What might cause
the disabling of the validations? Any hints, pointer?
Many thanks in advance and best regards
Torsten