diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-03-19 20:53:20 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-03-19 20:53:20 +0300 |
commit | e118487c2a9f86ffd6c23e1f709662314b1284b6 (patch) | |
tree | e61552e44781f70d8fd2405694420ce4ff3857a4 /app | |
parent | a520ab64db0ba9815627c197c60139d1a9a5c6d4 (diff) |
Remove `www.` from `twitter_url` helper
Twitter redirects `www.twitter.com` to `twitter.com`
Also removes unnecessary regex escapes, just 'cause.
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index af9c8bf1bd3..3ddf8eb3369 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -300,7 +300,7 @@ module ApplicationHelper def linkedin_url(user) name = user.linkedin - if name =~ %r{\Ahttps?:\/\/(www\.)?linkedin\.com\/in\/} + if name =~ %r{\Ahttps?://(www\.)?linkedin\.com/in/} name else "https://www.linkedin.com/in/#{name}" @@ -309,10 +309,10 @@ module ApplicationHelper def twitter_url(user) name = user.twitter - if name =~ %r{\Ahttps?:\/\/(www\.)?twitter\.com\/} + if name =~ %r{\Ahttps?://(www\.)?twitter\.com/} name else - "https://www.twitter.com/#{name}" + "https://twitter.com/#{name}" end end |