Skip to content

Instantly share code, notes, and snippets.

Created August 29, 2013 16:07
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 anonymous/6380082 to your computer and use it in GitHub Desktop.
Save anonymous/6380082 to your computer and use it in GitHub Desktop.
i'm not sure if i get everything right? what exactly would be wrong with:
class Show
has_many :episodes
end
class Episode
belongs_to :show
has_many :embeds
end
class Embed
belongs_to :episode
end
..forein_key always on the model that has the belongs_to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment