I have a User model, which has a workplace attribute. The Workplace is not mandatory and I created it as a separate model, since it has more than one attribute (company, department, years of service etc..).
I put up a has_one & belongs_to relationship between User and Workplace to ease manipulation and request of data from the Workplace model. But what is the proper way of filling the data into the Workplace model attributes, when they are empty at the creation?
The way you implemented the models, you can also create both models separated and then just write user.workplace=workplace