Transaction as a reserved *instance* method

Is there a historical reason why #transaction is defined as both an instance and class method within ActiveRecord models? I bring this up specifically because it prevents us from using "transaction" as an association name like so:

class PaymentTransaction < ActiveRecord::Base end

class PaymentAccount < ActiveRecord::Base   has_one :transaction, :class_name => 'PaymentTransaction' end

This obviously won't work because the #transaction instance method is used throughout ActiveRecord::Transactions instead of the class method.

Does anyone have any thoughts on solely using the class method to avoid a common name collision like this?

Does anyone have any thoughts on solely using the class method to avoid a common name collision like this?

We can't remove the instance method as people use that in their code, however I personally can't see why we couldn't take a patch so that ActiveRecord only ever calls the class method. This way you'll be able to 'have one' transaction, but not break backwards compatibility.

Historically you couldn't have a model called 'Transaction' anyway because of our old, bundled version of transaction-simple. This was unbundled in 2.0.