Skip to content

Commit

Permalink
Use safer method of checking rails version
Browse files Browse the repository at this point in the history
  • Loading branch information
svanhesteren committed Jan 31, 2024
1 parent d7b2298 commit 8f3806e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/eyaml/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f3806e

Please sign in to comment.