Hi there I need to store additional attributes on join table. Searching the Wiki  revealed two possible methods: 1) push_with_attributes, as described by Justin Palmer . Unfortunately, "this method is now deprecated" . Even if it wasn't, there seem to be inherent problems with that approach, for example with updating those additional attributes, though Joshua M. have provided us with a plugin for that . 2) promote the join-table to a full module. This approach seems to integrate better with Rails, and even a newb like me can sense that it has a lesser chance of rubbing ActiveRecord's magic the wrong way, thereby breaking something. Still, that habtm association is just an association, not a model. I wouldn't want to make it a model if I could help it. So, what's the best practice for storing additional data on join tables with Rails? -Alder -------------------  http://wiki.rubyonrails.com/rails/pages/has_and_be...  http://encytemedia.com/blog/articles/2005/06/15/st...  http://api.rubyonrails.com/classes/ActiveRecord/As...  http://wiki.rubyonrails.com/rails/pages/Update+has...
on 2006-05-06 21:19
on 2006-05-06 21:23
Make the join table a full model and look in the docs for has_many :through http://api.rubyonrails.org/classes/ActiveRecord/As... Peter
on 2006-05-06 21:54
Alder G. wrote: > So, what's the best practice for storing additional data on join > tables with Rails? http://blog.hasmanythrough.com/articles/2006/04/20... -- Josh S. http://blog.hasmanythrough.com
on 2006-05-06 23:10
On 5/6/06, Josh S. <email@example.com> wrote: > Alder G. wrote: > > So, what's the best practice for storing additional data on join > > tables with Rails? > > http://blog.hasmanythrough.com/articles/2006/04/20... > > -- > Josh S. > http://blog.hasmanythrough.com Thanks Josh! "has_many :through" is awesome, and your article is very informative. Certainly, through associations are the proper way to do what I want. Regards, Alder