0

How do I render a 404 or page doesn't exist like Twitter does? I use rails 3.2.3

My code

def rescue_with_handler(exception)
  redirect_to '/500.html'
end

def method_missing(id, *args)
 redirect_to '/404.html'
end

That works, but I want to be like twitter. For example if I access this page https://twitter.com/abcd/skka/asafaga and https://twitter.com/abcd/skka

4

1 回答 1

0

你必须Routing Error处理rescue_from.

这个问题已经回答了:

这里也有解决方案:

无论如何,尝试谷歌它,你会发现很多不同的解决方案。

于 2012-05-27T09:30:30.727 回答