]> git.openstreetmap.org Git - rails.git/commitdiff
Replace count.zero? with empty?
authorTom Hughes <tom@compton.nu>
Wed, 1 Jan 2025 12:11:22 +0000 (12:11 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 16 Feb 2025 13:56:02 +0000 (13:56 +0000)
app/controllers/accounts_controller.rb

index 085d1bfea055091af3a074b552713edea291980c..d02943640147a37476832d74fed15a107a314af2 100644 (file)
@@ -31,7 +31,7 @@ class AccountsController < ApplicationController
        (params[:user][:auth_provider] == current_user.auth_provider &&
         params[:user][:auth_uid] == current_user.auth_uid)
       update_user(current_user, user_params)
-      if current_user.errors.count.zero?
+      if current_user.errors.empty?
         redirect_to edit_account_path
       else
         render :edit