Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #4932 (closed enhancement: duplicate)

Opened 4 years ago

Last modified 4 years ago

[PATCH] Check for existing Transaction::Simple definition before loading ActiveRecord's bundled version

Reported by: eigentone@gmail.com Assigned to: David
Priority: normal Milestone:
Component: ActiveRecord Version:
Severity: normal Keywords:
Cc:

Description

ActiveRecord depends on and bundles Transaction::Simple in it's vendor directory. Unfortunately the packaging is incomplete and results in pain and warnings for those who are trying to use AR and the complete Transaction::Simple package together. François Beausoleil brought this up on the mailing list and David Heinemeier Hansson responded that it would be resolved, though probably not until Rails version two.

Discussion from the mailing list:
http://lists.rubyonrails.org/pipermail/rails-core/2006-March/001187.html
http://lists.rubyonrails.org/pipermail/rails-core/2006-March/001188.html

This patch offers an interim solution by modifiing active_record/transactions.rb to not load the bundled version if Transaction::Simple has already been defined. Authors who require the complete package need only require 'transaction/simple' before require(ing) 'active_record' in their scripts.

Attachments

check_before_loading_bundled_transaction_simple.diff (0.6 kB) - added by eigentone@gmail.com on 04/29/06 20:03:20.

Change History

04/29/06 20:03:20 changed by eigentone@gmail.com

  • attachment check_before_loading_bundled_transaction_simple.diff added.

05/01/06 17:13:49 changed by anonymous

  • status changed from new to closed.
  • resolution set to duplicate.