We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
#encrypt_as_text
1 parent fc9ccbd commit 31ba84dCopy full SHA for 31ba84d
activerecord/lib/active_record/encryption/encrypted_attribute_type.rb
@@ -134,11 +134,11 @@ def serialize_with_current(value)
134
end
135
136
def encrypt_as_text(value)
137
- if encryptor.binary? && !cast_type.binary?
138
- raise Errors::Encoding, "Binary encoded data can only be stored in binary columns"
139
- end
140
-
141
with_context do
+ if encryptor.binary? && !cast_type.binary?
+ raise Errors::Encoding, "Binary encoded data can only be stored in binary columns"
+ end
+
142
encryptor.encrypt(value, **encryption_options)
143
144
0 commit comments