Sha256: d0429ff4a337d373afa212ce6f667a4c925e170fa1958f327ff2c2b07a1cb108

Contents?: true

Size: 642 Bytes

Versions: 4

Compression:

Stored size: 642 Bytes

Contents

# frozen_string_literal: true

if defined?(DataMapper)
  module AttrEncrypted
    module Adapters
      module DataMapper
        def self.extended(base) # :nodoc:
          class << base
            alias_method :included_without_attr_encrypted, :included
            alias_method :included, :included_with_attr_encrypted
          end
        end

        def included_with_attr_encrypted(base)
          included_without_attr_encrypted(base)
          base.extend AttrEncrypted
          base.attr_encrypted_options[:encode] = true
        end
      end
    end
  end

  DataMapper::Resource.extend AttrEncrypted::Adapters::DataMapper
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
attr_encrypted-4.0.0 lib/attr_encrypted/adapters/data_mapper.rb
powerhome-attr_encrypted-1.2.0 lib/attr_encrypted/adapters/data_mapper.rb
powerhome-attr_encrypted-1.1.0 lib/attr_encrypted/adapters/data_mapper.rb
powerhome-attr_encrypted-1.0.1 lib/attr_encrypted/adapters/data_mapper.rb