osem-fcy/spec/support/kneet_connections.rb

13 lines
263 B
Ruby
Raw Normal View History

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