Sha256: 3b1403e44137094a43a5f5b766f5b491214f70c6e087247cda05e15b8d9533b5

Contents?: true

Size: 282 Bytes

Versions: 12

Compression:

Stored size: 282 Bytes

Contents

# frozen_string_literal: true

module DatabaseRewinder
  class DummyModel < ActiveRecord::Base
    class << self
      def with_temporary_connection(config)
        establish_connection config
        yield connection
        connection.pool.disconnect!
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
database_rewinder-1.1.0 lib/database_rewinder/dummy_model.rb
database_rewinder-1.0.1 lib/database_rewinder/dummy_model.rb
database_rewinder-1.0.0 lib/database_rewinder/dummy_model.rb
database_rewinder-0.9.9 lib/database_rewinder/dummy_model.rb
database_rewinder-0.9.8 lib/database_rewinder/dummy_model.rb
database_rewinder-0.9.7 lib/database_rewinder/dummy_model.rb
database_rewinder-0.9.6 lib/database_rewinder/dummy_model.rb
database_rewinder-0.9.5 lib/database_rewinder/dummy_model.rb
database_rewinder-0.9.4 lib/database_rewinder/dummy_model.rb
database_rewinder-0.9.3 lib/database_rewinder/dummy_model.rb
database_rewinder-0.9.2 lib/database_rewinder/dummy_model.rb
database_rewinder-0.9.1 lib/database_rewinder/dummy_model.rb