extract mutation from generation method
factory methods should not have side effects.

Move model mutation to the methods that are called on the model.
Use GeneratedAttribute#column_name if #reference? scaffold_generator in _form view [Fixes #11573]
add a specific factory method rather than using new