diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-09-30 13:56:59 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-09-30 13:56:59 +0100 |
commit | c64360898beca1162a1bdef9ca4b76676e0907f8 (patch) | |
tree | 5c0452a20ce0310f72d0741b171085c5efe1d312 /app/controllers | |
parent | e5a9052a9ffd27117775e8adaeaa2e24607e8000 (diff) | |
parent | 3a40bfc8a8abbfedb554215849b1c6372864eb1f (diff) |
Merge branch 'issues/1827-healthcheck' into rails-3-develop
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/health_checks_controller.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/health_checks_controller.rb b/app/controllers/health_checks_controller.rb new file mode 100644 index 000000000..473a1aacc --- /dev/null +++ b/app/controllers/health_checks_controller.rb @@ -0,0 +1,16 @@ +class HealthChecksController < ApplicationController + + def index + @health_checks = HealthChecks.all + + respond_to do |format| + if HealthChecks.ok? + format.html { render :action => :index, :layout => false } + else + format.html { render :action => :index, :layout => false , :status => 500 } + end + end + + end + +end |