need some info regarding "how to add friends"

hi every one,

i'm new to ruby on, need some help.

my project is that a user can add friends to his profile where friends
are users themselves.

i thought of creating two tables one for users and other for
user_friends.i don't know how to relate these two tables so that they
serve my purpose.

any suggestions plz.

thanks in advance.

I am also new but I think you just need to add to Users model:
has_and_belongs_to_many :users.

thank u russian for the reply.

i did add has_and_belongs_to_many :users. to User model.

thank u shai

the urls u send were really helpful.i got great deal of relevant stuff
from those links.