mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Fix RuboCop offense Style/StringChars (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@23009 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1271,11 +1271,6 @@ Style/StderrPuts:
|
||||
- 'config/environment.rb'
|
||||
- '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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user