Has_many

Hi,

I am having a hard time to handle has_many associations.
I have something like this

–in model farm

has_many :parties

–in farms_controller

@farm.update_attributes(params[:farm])

where params[:farm][:parties] has values…

In the cration of the farm it goes all well, but when updating it I
have problems…

  1. It doesn’t consider the parties validations
  2. Even if it is all ok whith the detail, it is simply not saved.

thanks in advance


Ricardo A.
[email protected]
Acras Desenvolvimento de Sistemas
+55+41-3232-6404
www.acras.net

i think you may have to @farm.build_parties(params[:farm][:parties]). im
not sure though.