From 8f3806e1a96ef9374ca8acf5a5d590672015532e Mon Sep 17 00:00:00 2001 From: Sebastian van Hesteren Date: Wed, 31 Jan 2024 13:08:19 +0100 Subject: [PATCH] Use safer method of checking rails version --- lib/eyaml/railtie.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eyaml/railtie.rb b/lib/eyaml/railtie.rb index e24feba..d16bbfb 100644 --- a/lib/eyaml/railtie.rb +++ b/lib/eyaml/railtie.rb @@ -9,7 +9,7 @@ class Railtie < Rails::Railtie PRIVATE_KEY_ENV_VAR = "EJSON_PRIVATE_KEY" config.before_configuration do - secrets_or_credentials = if Rails.version >= "7.2" || Dir.glob(Rails.root.join("config", "credentials.*")).any? + secrets_or_credentials = if Rails.version.start_with?("7.2") || Dir.glob(Rails.root.join("config", "credentials.*")).any? :credentials else :secrets