friendship.befriender = current_user
friendship.befriendee = @friend
if current_user.friends_with?(@friend)
friendship.befriender = current_user
friendship.befriendee = @friend
if current_user.friends_with?(@friend)
elsif friendship.save
flash[:notice] = t ".success", :name => @friend.display_name
UserMailer.friendship_notification(friendship).deliver_later
elsif friendship.save
flash[:notice] = t ".success", :name => @friend.display_name
UserMailer.friendship_notification(friendship).deliver_later
Friendship.where(:befriender => current_user, :befriendee => @friend).delete_all
flash[:notice] = t ".success", :name => @friend.display_name
else
Friendship.where(:befriender => current_user, :befriendee => @friend).delete_all
flash[:notice] = t ".success", :name => @friend.display_name
else