I’ve overridden the default error handling mechanism with a custom
error handler library that’s included in environment.rb:
class ActionController::Base
def rescue_action_in_public(exception)
case exception
when ActionController::UnknownAction then
render(:file => “#{RAILS_ROOT}/public/404.html”, :status => “404
Not Found”)
else
render(:file => “#{RAILS_ROOT}/public/500.html”, :status => “500
Error”)
end
end
end
This works fine, and my custom error message gets displayed. However,
before it in the source of the html page, this is still being inserted:
Status: 500 Internal Server Error
Content-Type: text/html
How do I turn that off and display just the custom error page?
Thanks!
–
- Adam
** Expert Technical Project and Business Management
**** System Performance Analysis and Architecture
****** [ http://www.adamfields.com ]
[ Adam Fields (weblog) - - entertaining hundreds of millions of eyeball atoms every day ] … Blog
[ Adam Fields Resume ]… Experience
[ Adam Fields | Flickr ] … Photos
[ http://www.aquicki.com/wiki ]…Wiki