Add and apply Style/StringChars rubocop rule
This rule was added in Rubocop 1.12.0.
This commit is contained in:
@@ -538,6 +538,9 @@ Style/SingleLineMethods:
|
||||
Style/SoleNestedConditional:
|
||||
Enabled: true
|
||||
|
||||
Style/StringChars:
|
||||
Enabled: true
|
||||
|
||||
Style/StringLiterals:
|
||||
EnforcedStyle: double_quotes
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class Management::UsersController < Management::BaseController
|
||||
end
|
||||
|
||||
def user_without_email
|
||||
new_password = "aAbcdeEfghiJkmnpqrstuUvwxyz23456789$!".split("").sample(10).join
|
||||
new_password = "aAbcdeEfghiJkmnpqrstuUvwxyz23456789$!".chars.sample(10).join
|
||||
@user.password = new_password
|
||||
@user.password_confirmation = new_password
|
||||
|
||||
|
||||
Reference in New Issue
Block a user