Forum: Ruby on Rails Anyway to get << working with has_many through in Rails 1.2?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
525128e48ca2b4c7fb6176ea166fccfd?d=identicon&s=25 Eric G. (gotskill10)
on 2007-04-16 19:01
Is there any way to get the edge rails feature that allows you to do use
<< to add    an object to a relationship, just like in the HABTM. I know
Josh Susser talked about about how someone released a fix for it, but it
didnt seem to make it into Rails 1.2. Any ideas?
525128e48ca2b4c7fb6176ea166fccfd?d=identicon&s=25 Eric G. (gotskill10)
on 2007-04-17 04:38
I tried extending the relationship, but this method seems a little

has_many :through=>x do

   def <<(value)

However, Im having a little trouble getting the id for the object since
its passing through another relationship. Any ideas.

Thanks in advance.
This topic is locked and can not be replied to.