From d7fbc55840dc77f5ded8c98e8090d5a06e66988d Mon Sep 17 00:00:00 2001 From: Nic Duke Date: Thu, 9 Feb 2023 16:09:37 +0000 Subject: [PATCH] conditional require railtie if Rails module exists --- lib/audited.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/audited.rb b/lib/audited.rb index 1b964c57..f0da4601 100644 --- a/lib/audited.rb +++ b/lib/audited.rb @@ -53,4 +53,4 @@ def config end require "audited/sweeper" -require "audited/railtie" +require "audited/railtie" if Audited.const_defined?(:Rails)