summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-30 15:07:18 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-30 15:07:18 +0200
commitc370dce01c95ff3d2cf102f4bdcf8347e3764893 (patch)
tree8114023b91b681fff51931a76d50a1f3d4297588 /lib
parent43c35b0f20fb3bb67ea2b96bf8f806c7e95b6aec (diff)
downloadgitlab-ce-c370dce01c95ff3d2cf102f4bdcf8347e3764893.tar.gz
Enable Style/RedundantParentheses rubocop coprubocop/enable-redundant-parentheses-cop
See #17478
Diffstat (limited to 'lib')
-rw-r--r--lib/api/users.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index ea6fa2dc8a8..8a376d3c2a3 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -76,7 +76,7 @@ module API
required_attributes! [:email, :password, :name, :username]
attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit, :username, :bio, :location, :can_create_group, :admin, :confirm, :external]
admin = attrs.delete(:admin)
- confirm = !(attrs.delete(:confirm) =~ (/(false|f|no|0)$/i))
+ confirm = !(attrs.delete(:confirm) =~ /(false|f|no|0)$/i)
user = User.build_user(attrs)
user.admin = admin unless admin.nil?
user.skip_confirmation! unless confirm