The method to add errors on "validates_presence_of" validation directive i.e. the method "add_on_blank" is accepting array of attributes and iterating over them to push the error messages. There is unnecessary loop in the method "validates_presence_of" which is sending one by one all attributes from the array specified in the mode and there is nothing in the loop which is specific for a particular attribute to be executed infact it seems that it is redundantly evaluating the conditions using "unless (configuration[:if] && !evaluate_condition(configuration[:if], record))
(configuration[:unless] && evaluate_condition(configuration[:unless], record))".
Attachments
Change History
Download in other formats:
|