Module: Waves::Layers::DefaultErrors
- Defined in:
- lib/layers/default_errors.rb
Overview
Configures Waves to use the templates in app/templates/errors for exception handling
Class Method Summary collapse
Class Method Details
.included(app) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/layers/default_errors.rb', line 7 def self.included( app ) app.auto_eval :Configurations do auto_eval :Mapping do extend Waves::Mapping handle(Waves::Dispatchers::NotFoundError) do html = Waves.application.views[:errors].process( request ) do not_found_404( :error => Waves::Dispatchers::NotFoundError ) end response.status = '404' response.content_type = 'text/html' response.body = html end end end end |