All pastes #352404 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-02-12 20:15 UTC
rendered paste body
i have 2 object: Operador and Familia.
(Operador has_many Familias...)


>>op = Operador.find_first
>>puts op.familia_ids
=> []

familia_ids is null  :-)


op.familia_ids=['001','002']
=> ["001", "002"]
>> op.familia_ids
=> ["001", "002"]

Here, familia_ids is getting set, to the current object op.

i wish to save this relation, so i do 

>> op.save
=> true
>> op = Operador.find_first
>> op.familia_ids
=> []


How would persist this relation?