diff --git a/lib/lockup.rb b/lib/lockup.rb index 9494d0d..ad13dc8 100644 --- a/lib/lockup.rb +++ b/lib/lockup.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'lockup/engine' +require 'rails/health_controller_decorator' module Lockup extend ActiveSupport::Concern diff --git a/lib/rails/health_controller_decorator.rb b/lib/rails/health_controller_decorator.rb new file mode 100644 index 0000000..45e2797 --- /dev/null +++ b/lib/rails/health_controller_decorator.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Rails + module HealthControllerDecorator + def check_for_lockup + true + end + + klass = '::Rails::HealthController'.safe_constantize + klass.prepend(self) if klass + end +end