clean code and advance on related

move attribute to it's own class an test class
advance on related model and collection