Form has many entries. To serialize form and it's entries I use:
json = @form.to_json( { :only => Form.accessible_attributes.to_a, :include => {:entries => {:only => Entry.accessible_attributes.to_a}}})
Form and entries attributes can be modified or deleted while they are in JSON.
To deserialize I use (but not working) :
@form = @form.from_json(json)
@form.save
How to save entries at once with form?
See Question&Answers more detail:os