diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-10 19:30:02 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-10 19:31:07 +0300 |
commit | 0ece6bd82839d0c9e3e27b65a6a201771f09190e (patch) | |
tree | 40c877c8377f2bcad111de9e3bdf0daabdb0c3a3 /config/initializers/devise.rb | |
parent | 6cf7dd625a7db143c146de1b146cba7dbcbc2576 (diff) |
Use `\A` and `\z` in regexes instead of `^` and `$`.
Diffstat (limited to 'config/initializers/devise.rb')
-rw-r--r-- | config/initializers/devise.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 79abe3c695d..9dce495106f 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -208,7 +208,7 @@ Devise.setup do |config| if Gitlab::LDAP::Config.enabled? Gitlab.config.ldap.servers.values.each do |server| if server['allow_username_or_email_login'] - email_stripping_proc = ->(name) {name.gsub(/@.*$/,'')} + email_stripping_proc = ->(name) {name.gsub(/@.*\z/,'')} else email_stripping_proc = ->(name) {name} end |