search for: playliststrack

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

Did you mean: playlists_tracks
2007 Feb 05
6
Viewing object associated via "has_many :through"?
...as_many :track_twos, :through => :playlists_tracks, :source => :track end class Track < ActiveRecord::Base … has_many :playlists_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 playlis...