errship
30 Aug 2011
The static error pages Rails comes with are nice for getting started - you can’t break them, no matter what. But without your layout and navigation wrapped around them, they create a frustrating trap for your users.
The obvious solution is to render your layout into the static file, but what happens when you make a change?
Worse, what if you run a network of many Rails applications? Should they share one error page style? Should they all have their own?
You could hire your nephew to keep them all up to date… or you can use Errship.
Errship is a Rails 3.1 engine for rendering error pages inside your layout. It supports i18n, custom exceptions, and Airbrake (Hoptoad) error tracking.
You can also use the flashback method to set an error message and redirect :back safely - if a RedirectBackError is raised, the user is dropped off at the nearest error page and given the flash message anyway.
Check it out on Github at https://github.com/agoragames/errship