Class: Camping::Controllers::NotFound
- Inherits:
-
Object
- Object
- Camping::Controllers::NotFound
- Defined in:
- lib/camping-unabridged.rb,
lib/camping.rb
Overview
The NotFound class is a special controller class for handling 404 errors, in case you’d like to alter the appearance of the 404. The path is passed in as p
.
module Camping::Controllers
class NotFound
def get(p)
@status = 404
div do
h1 'Camping Problem!'
h2 "#{p} not found"
end
end
end
end
Instance Method Summary collapse
Instance Method Details
#get(p) ⇒ Object
28 |
# File 'lib/camping.rb', line 28 def get(p);r(404,div{h1("Cam\ping Problem!")+h2("#{p} not found")});end |