Skip to content

Instantly share code, notes, and snippets.

@jcohenho
Last active August 29, 2015 14:00
Show Gist options
  • Save jcohenho/11065868 to your computer and use it in GitHub Desktop.
Save jcohenho/11065868 to your computer and use it in GitHub Desktop.
class User
attr_accessible :username
has_many :tracks, through: :track_items
end
class TrackItem
attr_accessible :position
belongs_to :user
belongs_to :track
end
class Track
attr_accessible :audio_url, :title, :duration
has_many :track_items
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment