refactor relationships controller with respond_with