osem-fcy/spec/support/kneet_connections.rb

15 lines
294 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2014-08-07 09:19:58 +03:00
module ActiveRecord
class Base
mattr_accessor :shared_connection
@@shared_connection = nil
2014-08-07 09:19:58 +03:00
def self.connection
@@shared_connection || retrieve_connection
end
end
end
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection