Skip to content

Commit

Permalink
Avoid loading Railtie if SKIP_CONSULT is truthy
Browse files Browse the repository at this point in the history
  • Loading branch information
aharpervc committed Mar 24, 2023
1 parent 4a90ccf commit 26eab79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/consult.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@ def consul_token
end
end

require 'consult/rails/engine' if defined?(Rails)
if defined?(Rails) && !%w[1 true].include?(ENV['SKIP_CONSULT'].to_s.downcase)
require 'consult/rails/engine'
end

0 comments on commit 26eab79

Please sign in to comment.