# HG changeset patch # User Nattee Niparnan # Date 2021-11-02 17:11:27 # Node ID e2597379728cebc53a172ac9ecd5ca874ee05742 # Parent 0e8bd075a068254a0cbcbcda4886c370196b22ba fix bugs when user creation error diff --git a/app/controllers/user_admin_controller.rb b/app/controllers/user_admin_controller.rb --- a/app/controllers/user_admin_controller.rb +++ b/app/controllers/user_admin_controller.rb @@ -69,7 +69,7 @@ flash[:success] = "#{ok_user.count} user(s) was created or updated successfully" end if error_logins.size > 0 - flash[:error] = "Following user(s) failed to be created: " + error_note.join(', ') + ". The error of the first failed one are: " + error_msg; + flash[:error] = "Following user(s) failed to be created: " + error_logins.join(', ') + ". The error of the first failed one are: " + error_msg; end redirect_to :action => 'index' end