RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

Remove 404.html, 422.html, etc from public dir. Render errors in your layout

Taking advantage of the new "exception_app" functionality in Rails 3.2 better_exception_app provides a easy way to help you delete 404.html, 422.html and 500.html from you public directory. Error messages are rendered dynamically in your layout. No more copy/pasting, no more jarring white screen. If desired, keep certain errors static for safety (i.e. 500.html). Includes a generator to make it easy to keep the look of your static errors in sync with the rest of your site.

Comments

Post a Comment

Comment abilities for non registered users are currently deactivated, pending time to add a proper CAPTCHA to solve the escalating spam problem. Sorry!