Skip to content

Instantly share code, notes, and snippets.

@brunomichetti
Created August 27, 2019 19:53
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 brunomichetti/80ae491541279a0ecff19106def5103d to your computer and use it in GitHub Desktop.
Save brunomichetti/80ae491541279a0ecff19106def5103d to your computer and use it in GitHub Desktop.
class Influencer < ApplicationRecord
has_many :fan_influencers
has_many :fans, through: :fan_influencers
end
class Fan < ApplicationRecord
has_many :fan_influencers
end
class FanInfluencer < ApplicationRecord
belongs_to :fan
belongs_to :influencer
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment