diff options
-rw-r--r-- | .rubocop_todo.yml | 5 | ||||
-rw-r--r-- | app/models/user.rb | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 729c60209..fd17051b9 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1272,11 +1272,6 @@ Style/StderrPuts: - 'config/initializers/10-patches.rb' # This cop supports unsafe autocorrection (--autocorrect-all). -Style/StringChars: - Exclude: - - 'app/models/user.rb' - -# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Mode. Style/StringConcatenation: Enabled: false diff --git a/app/models/user.rb b/app/models/user.rb index 2d012fa41..2f4baba58 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -371,7 +371,7 @@ class User < Principal end chars = chars_list.flatten length.times {password << chars[SecureRandom.random_number(chars.size)]} - password = password.split('').shuffle(random: SecureRandom).join + password = password.chars.shuffle(random: SecureRandom).join self.password = password self.password_confirmation = password self |