Skip to content

Instantly share code, notes, and snippets.

@CaDs
Created October 17, 2018 07:00
Show Gist options
  • Save CaDs/a1409d138aa951ae1631141771e72166 to your computer and use it in GitHub Desktop.
Save CaDs/a1409d138aa951ae1631141771e72166 to your computer and use it in GitHub Desktop.
class Connection < ApplicationRecord
belongs_to :follower, class_name: 'User', foreign_key: :follower_id
belongs_to :following, class_name: 'User', foreign_key: :following_id
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment