Use respond_to instead of DeviseController.respond_to.