Hi:

Passing child virtual attribute validation error to parent...
in case of nested attributes.

So, I have a Parent Model say 'Parent'.
Nested Attributes it accepts for Child say 'Child'

Now suppose there is a validate method in 'Child'

and it has something like self.errors.add_to_base("some message").

How do you make sure that Parent gets this?

I thought it will be auto copied to Parent as in other normal class
macros like validates_presence_of.

However, in this case I am loosing the message display from Child to
Parent for this error.

Is there a manual copy method for Child to Parent?

This is for a Virtual Attribute added in Child, but just doing
self.errors in Validate of Child, shouldn't it be copied to Parent
directly?


Thanks for any clarifications here.
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to