I have two models
Board
has_one :pref, :autosave => true, :dependent => :destroy
Pref
belongs_to :board
The pref object has the default values set in the database, so no information should be used to create the object when creating the board. The identifier for the board is in the pref table.
Since: autosave => true, I thought that when creating and saving a new Board object, the pref object will be created and saved automatically.
This does not work this way, so I have to be a misunderstanding.
Is there a way to autosave the pref object while saving the board?
Thank you in advance
source
share