Skip to content

Commit

Permalink
Similar to Rails impl
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammed-io committed Dec 7, 2023
1 parent 0dd8507 commit aa3bae2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/diffcrypt/rails/encrypted_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ def key
end

# It's required since the commit https://github.com/rails/rails/commit/1740b1f2cb8104435b6041ec6bfaabe58a6d74e6
# Returns truthy if #key is truthy. Returns falsy otherwise. Unlike #key,
# does not raise MissingKeyError when +raise_if_missing_key+ is true.
# @return [Boolean]
def key?
!key.nil?
read_env_key || read_key_file
end

def change(&block)
Expand Down

0 comments on commit aa3bae2

Please sign in to comment.