]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_roles_controller.rb
Merge remote-tracking branch 'upstream/pull/5286'
[rails.git] / app / controllers / user_roles_controller.rb
index b54cd0bd7a3eee82ccfecb01ce14882ba1d7c3cc..469b2c40b626845191e7a5265e873c340da7c4f4 100644 (file)
@@ -22,7 +22,7 @@ class UserRolesController < ApplicationController
     if current_user == @user && @role == "administrator"
       flash[:error] = t("user_role.filter.not_revoke_admin_current_user")
     else
-      UserRole.where(:user_id => @user.id, :role => @role).delete_all
+      UserRole.where(:user => @user, :role => @role).delete_all
     end
     redirect_to user_path(@user)
   end