Hello all,
I'm currently working on upgrading our application to Rails 4.1 and am running into the following scenario.
We have an existing model named `Transaction` which conflicts with the ActiveRecord instance method of the same name when we refer to this model in a `belongs_to` association like this:
```
class Transaction < ActiveRecord::Base
end
class Thing < ActiveRecord::Base
belongs_to :transaction
end
```
This will trigger this error: "You tried to define an association named transaction on the model Thing, but this will conflict with a method
transaction already defined by Active Record. Please choose a different
association name."
My question is twofold:
1) Is there a convenient way to rename an association like this without having to change the model name, db table name, etc?
The word "Transaction" seems as though it would be a commonly used model name for many Rails applications so I'm just trying to gain an understanding of why this would be taken by ActiveRecord.
Thanks,
Jason