Skip to content

Instantly share code, notes, and snippets.

@DCarper
Created February 23, 2011 02:21
Show Gist options
  • Select an option

  • Save DCarper/839864 to your computer and use it in GitHub Desktop.

Select an option

Save DCarper/839864 to your computer and use it in GitHub Desktop.
class User < ActiveRecord::Base
has_many :memberships
has_many :fantasy_football_leagues, :through => :memberships,
:source => :app,
:source_type => 'FantasyFootballLeague'
has_many :march_madness_brackets, :through => :memberships,
:source => :app,
:source_type => 'MarchMadnessBracket'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment