discourse/app/controllers/forums_controller.rb
Joffrey JAFFEUX 0d3d2c43a0
DEV: s/\$redis/Discourse\.redis (#8431)
This commit also adds a rubocop rule to prevent global variables.
2019-12-03 10:05:53 +01:00

20 lines
375 B
Ruby

# frozen_string_literal: true
require "read_only_header"
class ForumsController < ActionController::Base
include ReadOnlyHeader
before_action :check_readonly_mode
after_action :add_readonly_header
def status
if $shutdown # rubocop:disable Style/GlobalVars
render plain: "shutting down", status: 500
else
render plain: "ok"
end
end
end