X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2169c503efbbeb45c3842e9fa5eef6cc01e8e27b..d33b1f6b29651c7e8a021ab37f8659054df4881f:/app/controllers/users_controller.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d8e8f6d3a..1ec9ab8d8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -417,7 +417,7 @@ class UsersController < ApplicationController if @friend if request.post? if current_user.is_friends_with?(@friend) - Friendship.where(:user_id => current_user.id, :friend_user_id => @friend.id).delete_all + Friendship.where(:befriender => current_user, :befriendee => @friend).delete_all flash[:notice] = t "users.remove_friend.success", :name => @friend.display_name else flash[:error] = t "users.remove_friend.not_a_friend", :name => @friend.display_name