Extract relaction_model to a method.