Forum: Ruby on Rails Join table with attributes

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.
19f9128c6036f543946d84e6ce0a3c09?d=identicon&s=25 J B Bell (Guest)
on 2006-01-01 01:09
(Received via mailing list)
Hi folks,

I'm trying to migrate a less-than-ideal schema for a Rails app that
role-playing gamers (the pencil-and-paper type) connect with each other,
at (the source is available there too, for

The schema currently uses columns for played_games, wanted_games, and
favorite_games in the players table; each of these holds a foreign key
the games table, as you might expect. Code has to be written three times
address these different columns. An obvious solution is a games_players
table with a status column to contain "wanted," "played," or "favorite."

However in searching online I find that, according to the rails wiki,
tables with attributes are problematic. I can use push_attributes to get
that status attribute, but a delete operation would apparently kill all
entries that match on the player_id and game_id columns, ignoring
differences in status. Is this still an issue? Or has it been fixed in
1.0? Is the usage different from what's suggested on the wiki? (I can't
to find this link again, or I'd include it--my apologies.)

This topic is locked and can not be replied to.