module ActiveRecord::Encryption::EncryptableRecord

def encrypt

Encrypts all the encryptable attributes and saves the changes.
def encrypt
  encrypt_attributes if has_encrypted_attributes?
end