method

encrypt_attribute

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: EncryptableRecord
encrypt_attribute(name, attribute_scheme) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 84
          def encrypt_attribute(name, attribute_scheme)
            encrypted_attributes << name.to_sym

            attribute name do |cast_type|
              ActiveRecord::Encryption::EncryptedAttributeType.new scheme: attribute_scheme, cast_type: cast_type
            end

            preserve_original_encrypted(name) if attribute_scheme.ignore_case?
            ActiveRecord::Encryption.encrypted_attribute_was_declared(self, name)
          end
Register or log in to add new notes.