search for: track_one_id

Displaying 1 result from an estimated 1 matches for "track_one_id".

2007 Feb 05
6
Viewing object associated via "has_many :through"?
..._tracks, :dependent => :destroy has_many :playlists, :through => :playlists_tracks has_many :playlists, :through => :playlists_tracks end class PlaylistsTrack < ActiveRecord::Base belongs_to :playlist belongs_to :track_one, :class_name => :track, :foreign_key => ''track_one_id'' belongs_to :track_two, :class_name => :track, :foreign_key => ''track_two_id'' end With them I’m able to save to the playlists_tracks table the following: id, playlist_id, track_one_id, track_two_id. That all seems to work fine. But no matter what I put in my pla...