Essentially, you want a federated model to connect users to users. But for Rails, you have to use more descriptive terms.
Twitter Rails, , Rails, Twitter. . Twitter (.. , , , )
class User < ActiveRecord::Base
has_many :followings
has_many :followers, :through => :followings, :class_name => "User"
has_many :followees, :through => :followings, :class_name => "User"
end
class Following < ActiveRecord::Base
belongs_to :follower, :class_name => "User"
belongs_to :followee, :class_name => "User"
end
(, Facebook , , ) . , SQL-. SQL , ActiveRecord, , .