Ruby assignment for database diagram and connecting models