Forum: Ruby on Rails habtm: attribute on join table

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Justin S. (Guest)
on 2006-03-24 23:56
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.
Justin S. (Guest)
on 2006-03-24 23:59
Shit. Nevermind. Got it.
Anonymous (Guest)
on 2006-04-09 23:00
(Received via mailing list)
If you're going to post here, for God's sake tell us what your solution
was.
Josh S. (Guest)
on 2006-04-09 23:49
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
This topic is locked and can not be replied to.