Replaced respond_to methods with respond_with in the relationship controller