Dynamic error page generation in Rails