如何在 Rails 中为整个应用程序返回 503 Service Unavailable?
此外,您如何对特定 Controller 执行相同的操作?
最佳答案
你可以使用head
head 503
# or
head :service_unavailable
关于ruby-on-rails - 在 Rails 中返回特定的 http 状态码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8890351/