Convert method into framework callback
Convert method into framework callback

This is somewhat related to [Move Statements to Callers](https://refactoring.com/catalog/moveStatementsToCallers.html)
combined together with introducing a callback instead of manually calling a method to initialize variables.
Notice that this is a special case of a constructor because the actual Ruby-alike constructor (i.e., initialize)
is not applicable here due to Rails context.

Rails callbacks: https://guides.rubyonrails.org/active_record_callbacks.html

sealuzh/cloud-workbench,sealuzh/cloud-workbench,sealuzh/cloud-workbench