Skip to content

Instantly share code, notes, and snippets.

@gma
Created March 13, 2009 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gma/78550 to your computer and use it in GitHub Desktop.
Save gma/78550 to your computer and use it in GitHub Desktop.
class Show < ActiveRecord::Base
has_many :episodes
has_many :users, :through => :episodes
end
class User < ActiveRecord::Base
has_many :episodes
has_many :shows, :through => :episodes
end
class Episode < ActiveRecord::Base
belongs_to :show
belongs_to :user
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment