I'd like to use Rails's asset pipeline to compile our custom HTTP error pages for nginx. I'd also like to use the standard Rails convention of a layout (say, app/views/layouts/error.html.erb) and views that render within that layout.
I found one article describing a way to simply precompile some ERb templates, but I'd still end up copying most of the layout code between the various templates.
I also thought about using caches_page in a controller and simply forcing the errors to occur during the build so that the files end up in public, but that seems really hacky.
Is there any way to achieve this?