Skip to content

Instantly share code, notes, and snippets.

@claudiob
Forked from jcohenho/gist:11065868
Last active August 29, 2015 14:00
Show Gist options
  • Save claudiob/11066888 to your computer and use it in GitHub Desktop.
Save claudiob/11066888 to your computer and use it in GitHub Desktop.
class User
attr_accessible :username
has_many :audio_items
end
class AudioItem
attr_accessible :position
belongs_to :user
belongs_to :song
end
class Song
attr_accessible :audio_url, :title, :duration
has_many :audio_items
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment