Skip to content

Instantly share code, notes, and snippets.

@jankeesvw
Created December 27, 2012 12:19
Show Gist options
  • Save jankeesvw/4387923 to your computer and use it in GitHub Desktop.
Save jankeesvw/4387923 to your computer and use it in GitHub Desktop.
class User < ActiveRecord::Base
has_many :followers
has_many :projects, through: :followers
end
class Project < ActiveRecord::Base
has_many :followers
has_many :users, through: :followers
end
class Follower < ActiveRecord::Base
belongs_to :projects
belongs_to :users
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment