Flowdock
method

assign_nested_attributes_for_one_to_one_association

Importance_1
assign_nested_attributes_for_one_to_one_association(association_name, attributes, allow_destroy) private

Assigns the given attributes to the association.

If the given attributes include an :id that matches the existing record’s id, then the existing record will be modified. Otherwise a new record will be built.

If the given attributes include a matching :id attribute and a :_delete key set to a truthy value, then the existing record will be marked for destruction.

Show source
Register or log in to add new notes.