Sha256: c5b24d62a92bd46a6a0ca379ec912c7d51644488e9b61a58c3fb0d971b6c1d66

Contents?: true

Size: 946 Bytes

Versions: 1

Compression:

Stored size: 946 Bytes

Contents

require "active_support"
require "active_record"

if defined?(ActiveSupport.on_load)
  ActiveSupport.on_load(:active_record) do
    require "active_record/connection_adapters/cipherstash_pg/database_extensions"

    # rubocop:disable Lint/ConstantDefinitionInBlock
    module ActiveRecord
      module ConnectionAdapters
        module CipherStashPG
          class Railtie < ::Rails::Railtie
            rake_tasks do
              load "active_record/connection_adapters/cipherstash_pg/database_tasks.rb"
            end
          end

          # Method to install CipherStash custom ORE types
          def self.install
            CipherStashPG::DatabaseExtensions.install
          end

          # Method to uninstall CipherStash custom ORE types
          def self.uninstall
            CipherStashPG::DatabaseExtensions.uninstall
          end
        end
      end
    end
    # rubocop:enable Lint/ConstantDefinitionInBlock

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-cipherstash-pg-adapter-0.1.0 lib/activerecord-cipherstash-pg-adapter.rb