Use respond_with.