I hacked around the addition of the invalid record - I don't remember seeing this in any documentation so I worry about the future.

It appears that returning false or nil from before_save when there is an error stops the record from being saved YMMV.

I still can't make the error message(s) appear though.

On 2/18/2011 10:28 AM, Donald R. Ziesig wrote:
 Hi All!

I think I posted this as a bug a while back, but now I need a fix or work-around before going into live beta.

I have a number of pages that have children needing to be added using auto_actions_for :amodel, [:create].

The added child requires validation to ensure database consistency. I have the validates_... in the model and have tested to ensure that the validation is being executed.

When the validation fails, it is silently ignored, the invalid record is added to the table.

The client's users have a tendency to ignore setting required fields which means I have to hold their hands, but can't!

Anyone have a fix?

Thanks,

Don Z.


--
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to