Sha256: 72ee777cca0f75bff7c112d31e5aeab5ac09ceb9136e45f73e3514716a998016
Contents?: true
Size: 1016 Bytes
Versions: 2
Compression:
Stored size: 1016 Bytes
Contents
require "symmetric_encryption/core" # Add extensions. Gems are no longer order dependent. begin require "rails" require "symmetric_encryption/railtie" rescue LoadError end begin require "active_support" ActiveSupport.on_load(:active_record) do require "symmetric_encryption/active_record/attr_encrypted" require "symmetric_encryption/railties/symmetric_encryption_validator" if ActiveRecord.version >= Gem::Version.new("5.0.0") ActiveRecord::Type.register(:encrypted, SymmetricEncryption::ActiveRecord::EncryptedAttribute) end # Remove old way of defining attributes with Rails 7 since it conflicts with the method names. if ActiveRecord.version <= Gem::Version.new("7.0.0") ActiveRecord::Base.include(SymmetricEncryption::ActiveRecord::AttrEncrypted) end end ActiveSupport.on_load(:mongoid) do require "symmetric_encryption/railties/mongoid_encrypted" require "symmetric_encryption/railties/symmetric_encryption_validator" end rescue LoadError end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
symmetric-encryption-4.6.0 | lib/symmetric_encryption.rb |
symmetric-encryption-4.5.0 | lib/symmetric_encryption.rb |