class UserFollowing < ActiveRecord::Base belongs_to :user, :foreign_key=> "user_id", :class_name => 'User' belongs_to :following_user, :foreign_key=> "following_user_id", :class_name => 'User' belongs_to :follower_user, :foreign_key=> "user_id", :class_name => 'User' end