Here's my code:
- unless Relationship.are_friends?(current_user, @user) && (current_user != @user)
- puts "d"*100
- puts "#{current_user.inspect}"
- puts "#{@user.inspect}"
= link_to "Add Friend", controller: "relationships", action: "req", name: @user.name, remote: true, class: "friend_link"
Basically the second condition "current_user != @user" is not working and I don't know why. When I puts the current user and @user they are working correctly. @user = User.find_by_name(params[:name]).
Thanks for the help!
unlessstatement.