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.