search for: validationerror

Displaying 1 result from an estimated 1 matches for "validationerror".

2005 Dec 22
0
Errors object missing when saving AR in Web Services method
...le to get Errors object when saving some Model instance in ActionWebService::Base subclass. I want to create API method that will return ID of the object when saved successfully. When validation fails and the object is not saved I''d like the method to return ID, as well as the array of ValidationError custom struct. But I cannot fill in this because unsaved object contain NO errors object, it just contains @new_record = true (and this indicates that it has not been saved). Here is the sample API method: <code> # Not all required attrs are provided since I want it to be invalid def new...