How to test 500.html in rails development env?

前端 未结 8 1222
悲哀的现实
悲哀的现实 2020-12-14 05:53

I want to test the 500 error pages in my Rails app using the development environment.

I already tried this in config/environments/development.rb:

8条回答
  •  半阙折子戏
    2020-12-14 06:35

    if you just want to force a 500 error to see what it looks like, you can just add this to a view:

    haml example:

    = render :partial => "broken", :status => 500
    

提交回复
热议问题