method

force_encoding_if_needed

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: Encryptor
force_encoding_if_needed(value) private

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/encryptor.rb, line 142
        def force_encoding_if_needed(value)
          if forced_encoding_for_deterministic_encryption && value && value.encoding != forced_encoding_for_deterministic_encryption
            value.encode(forced_encoding_for_deterministic_encryption, invalid: :replace, undef: :replace)
          else
            value
          end
        end
Register or log in to add new notes.