instance method
ciphertext_for
Ruby on Rails 8.0.4
Since v7.0.10Signature
ciphertext_for(attribute_name)
Returns the ciphertext for attribute_name.
Parameters
-
attribute_namereq
Source
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 157
def ciphertext_for(attribute_name)
if encrypted_attribute?(attribute_name)
read_attribute_before_type_cast(attribute_name)
else
read_attribute_for_database(attribute_name)
end
end
Defined in activerecord/lib/active_record/encryption/encryptable_record.rb line 157
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Encryption::EncryptableRecord