discourse/app/controllers/forums_controller.rb
Sam e5888cf090 PERF: avoid preloading json in cases where it is not needed
(uploads / avatars / non GET requests)
2015-05-20 17:12:16 +10:00

23 lines
516 B
Ruby

class ForumsController < ApplicationController
skip_before_filter :preload_json, :check_xhr
skip_before_filter :authorize_mini_profiler, only: [:status]
skip_before_filter :redirect_to_login_if_required, only: [:status]
def status
if $shutdown
render text: 'shutting down', status: 500, content_type: 'text/plain'
else
render text: 'ok', content_type: 'text/plain'
end
end
def error
raise "WAT - #{Time.now}"
end
def home_redirect
redirect_to path('/')
end
end