Validating nested models

Hi

I’m using Rails 2.3 and I want to validate that a nested model’s
attribute is numerical.
How do I do that and then catch the error if there is one?

Thanks!

On Mon, Apr 25, 2011 at 5:58 PM, Mlle [email protected] wrote:

Hi

I’m using Rails 2.3 and I want to validate that a nested model’s
attribute is numerical.
How do I do that and then catch the error if there is one?

Give this a try, I think if you use the form builder and standard
validation
messages, as long as you have the validation in your nested model it
should
magically give you the error if a wrong value is submitted on a nested
form.
I have only started using this in rails 3 but I would guess it would
work
the same.