Class: Waves::Views::Errors
Constant Summary
Helpers::DocType::DOCTYPES
Instance Attribute Summary
Attributes included from Mixin
#request
Instance Method Summary
collapse
#doctype
Methods included from Mixin
#initialize
#app, #attributes, #captured, #controller, #http_cache, #log, #main, #model, #model_name, #modified?, #not_found, #not_modified, #params, #paths, #query, #redirect, #resource, #response, #traits, #view
Instance Method Details
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/waves/views/errors.rb', line 9
def ( title )
<<-HTML
<head>
<title>#{title}</title>
<style>
body { background: #933; padding: 20px; font-family: verdana, sans-serif; }
h1 { font-size: 60px; font-weight: bold; }
p { font-size: 24px; }
</style>
</head>
HTML
end
|
#not_found_404 ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/waves/views/errors.rb', line 22
def not_found_404
DOCTYPES[ :html4_transitional ]
<<-HTML
<html>
#{ ( '404: Not Found' ) }
<body>
<h1>404</h1>
<p>That URL does not exist on this server.</p>
</body>
</html>
HTML
end
|
#server_error_500 ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/waves/views/errors.rb', line 35
def server_error_500
DOCTYPES[ :html4_transitional ]
<<-HTML
<html>
#{ ( '500: Server Error' ) }
<body>
<h1>500</h1>
<p>Internal server error. Sorry, but your request could not be processed.</p>
</body>
</html>
HTML
end
|