Module: Waves::Layers::DefaultErrors
- Defined in:
- lib/layers/default_errors.rb
Class Method Summary collapse
Class Method Details
.included(app) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/layers/default_errors.rb', line 5 def self.included( app ) app.instance_eval do autoinit 'Configurations::Mapping' do 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.write( html ) end end end end |