File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change 31
31
# where your application is being restarted due to a third-party service going
32
32
# bad. Ideally, you should design your application to handle those outages
33
33
# gracefully.
34
- class Rails ::HealthController < ActionController ::Base
35
- rescue_from ( Exception ) { render_down }
34
+ module Rails
35
+ class HealthController < ActionController ::Base
36
+ rescue_from ( Exception ) { render_down }
36
37
37
- def show
38
- render_up
39
- end
40
-
41
- private
42
- def render_up
43
- render html : html_status ( color : "green" )
38
+ def show
39
+ render_up
44
40
end
45
41
46
- def render_down
47
- render html : html_status ( color : "red" ) , status : 500
48
- end
42
+ private
43
+ def render_up
44
+ render html : html_status ( color : "green" )
45
+ end
49
46
50
- def html_status ( color :)
51
- %(<html><body style="background-color: #{ color } "></body></html>) . html_safe
52
- end
47
+ def render_down
48
+ render html : html_status ( color : "red" ) , status : 500
49
+ end
50
+
51
+ def html_status ( color :)
52
+ %(<html><body style="background-color: #{ color } "></body></html>) . html_safe
53
+ end
54
+ end
53
55
end
You can’t perform that action at this time.
0 commit comments