Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
浓缩咖啡中未处理的路线似乎没有引发 404,而是我在浏览器中看到了这个"max params accepted: 0; params given: 1"。有没有办法将其普遍路由到错误处理程序?
"max params accepted: 0; params given: 1"
谢谢!
这更多是关于参数而不是路线。
已解决的操作返回“X 参数接受,Y 给定”消息。
很可能你有类似的东西:
def some_action # ... end
并像只响应/some_action/something 时一样调用它:some_action/some_action/
/some_action/something
:some_action
/some_action/
要处理这些错误,只需添加一个 404 错误处理程序:
class App < E error 404 do |error| # render your styled error page end # actions end