Skip to content

Instantly share code, notes, and snippets.

@metaskills
Created October 20, 2015 19:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metaskills/72f36d73e5777481ced8 to your computer and use it in GitHub Desktop.
Save metaskills/72f36d73e5777481ced8 to your computer and use it in GitHub Desktop.
Rails 4.2 Capybara Transactional Fixtures Example.
class ActiveRecord::Base
CONNECTION_LOCK = Mutex.new
def self.connection ; CONNECTION_LOCK.synchronize { @@shared_base_connection ||= retrieve_connection } ; end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment