Class: RackStep::ErrorController

Inherits:
Controller show all
Defined in:
lib/controller.rb

Overview

This controller will handle error the error “page not found”. The user may overwrite this by creating new router to ‘notfound’.

Instance Attribute Summary

Attributes inherited from Controller

#request, #response, #settings

Instance Method Summary collapse

Methods inherited from Controller

#after, #before, #initialize

Constructor Details

This class inherits a constructor from RackStep::Controller

Instance Method Details

#not_foundObject



47
48
49
50
51
# File 'lib/controller.rb', line 47

def not_found
  @response.body = '404 - Page not found'
  @response.content_type = 'text/plain'
  @response.status  = 404
end