[Note: parts of this message were removed to make it a legal post.]
First, there is a board specific to rails, try
http://lists.rubyonrails.org/mailman/listinfo/rails
Here are my thoughts, though, and please understand that I cannot see your
application, so I am simply hypothesizing.
Also, the method is presumably defined in app/models/user.rb and examining
that method would shed more information.
Based on the context, my assumptions would be:
You have two users, that are using the site in some way.
One user may see how another user is using the site, and finds it
interesting (she has a cute screenname).
He decides to follow her, which invokes the 'make_friends' method.
At this point, he is the user and she is the target. She is not following
him (she's a cold mamba jamba), so it returns false. Which causes your code
to add him as a follower to her, unless he is already following her (stalker
alert). This creates a row in the friends table that has him as the inviter,
and her as the invited. But she hasn't accepted yet, so it sets the status
column to PENDING.
For more info on how this is done, see
http://guides.rubyonrails.org/association_basics.html#self-joins or look at
your Friend model.
She receives the friend request, and decides he is interesting (has a sexy
avatar) So she accepts the friend request, or just goes to his
app/views/users/show.html.erb and follows him.
This invokes the 'make_friends' method, this time with her as the user, and
him as the target. Since he sent her a friend request earlier,
user.followed_by?(target) returns true. It then finds that request, and
updates status to ACCEPTED and also creates another record, with her as the
inviter, him as the invited, and status ACCEPTED, so there are two records,
one from him to her, and one from her to him.
Your code apparently considers this to be friendship (heartwarming).