Habtm: attribute on join table


#1

How do I retrieve the value of an attribute on my join table? For
example:

table ‘people_places’
person_id
place_id
disposition

The first two use foreign keys and all that (I get that part). The value
of ‘disposition’ is what I want.


#2

Shit. Nevermind. Got it.


#3

If you’re going to post here, for God’s sake tell us what your solution
was.


#4

Justin S. wrote:

How do I retrieve the value of an attribute on my join table? For
example:

table ‘people_places’
person_id
place_id
disposition

The first two use foreign keys and all that (I get that part). The value
of ‘disposition’ is what I want.

Note that rich associations (attributes in join tables) have recently
been deprecated. If you want that functionality, you should use a full
join model (has_many :through).
http://dev.rubyonrails.org/changeset/4123


Josh S.
http://blog.hasmanythrough.com