instance method
validate_credential
Ruby on Rails 7.0.10
Since v7.0.10 Last seen in v7.0.10 PrivateSignature
validate_credential(key, error_message = "is not configured")
No documentation comment.
Parameters
-
keyreq -
error_messageopt = "is not configured"
Source
# File activerecord/lib/active_record/encryption/scheme.rb, line 83
def validate_credential(key, error_message = "is not configured")
unless ActiveRecord::Encryption.config.public_send(key).present?
raise Errors::Configuration, "#{key} #{error_message}. Please configure it via credential "\
"active_record_encryption.#{key} or by setting config.active_record.encryption.#{key}"
end
end
Defined in activerecord/lib/active_record/encryption/scheme.rb line 83
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Encryption::Scheme