[PATCH] add support for has_many :through's :source option
Reported by Bob Showalter | July 11th, 2008 @ 11:13 AM
should_have_many :through doesn't work with associations that use the :source option. It tries to reflect on the association name rather than the source name.
This patch looks for the :source option on the association if present and uses that as the association class.
Comments and changes to this ticket
-

-

Bob Showalter July 29th, 2008 @ 04:08 PM
- → Title changed from Patch: add support for has_many :through's :source option to [PATCH] add support for has_many :through's :source option
-
Ryan McGeary August 1st, 2008 @ 11:14 AM
Bob,
It looks like Tammer took care of this independently with this commit:
http://github.com/thoughtbot/sho...
I think it is important that Tammer gave priority to :class_name over :source, but please confirm this suffices for you and I'll close this ticket.
-

Bob Showalter August 1st, 2008 @ 11:45 AM
Hi Ryan,
My branch does have a test for this you might want to merge, since
Tammer didn't include a test. Other than that, looks fine to me.
Thanks,
Bob
-

Bob Showalter August 1st, 2008 @ 11:50 AM
Hi Ryan,
My branch does have a test for this you might want to merge, since
Tammer didn't include a test. Other than that, looks fine to me.
Thanks,
Bob
-
Ryan McGeary August 1st, 2008 @ 01:44 PM
- → Assigned user changed from Tammer Saleh to Ryan McGeary
- → State changed from new to committed
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
