instance method ciphertext_for

Ruby on Rails 7.1.6

Since v7.0.10

Available in: v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

ciphertext_for(attribute_name)

Returns the ciphertext for attribute_name.

Parameters

attribute_name req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close