diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-05-23 13:21:02 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-05-23 13:21:02 -0400 |
commit | 2de1109da39a46200e741b5a6643ce7fb1418041 (patch) | |
tree | bc1f2d8ff501f081fa1269cacfc88ebaf170693d /app/helpers | |
parent | bc806831e818b6e1ec2d1ae81221126f03c01f11 (diff) | |
download | gitlab-ce-2de1109da39a46200e741b5a6643ce7fb1418041.tar.gz |
Enable Performance/StartWith cop and fix offensesrs-start-with
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/gitlab_markdown_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/tab_helper.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index 3a45205563e..0a1b48af219 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -13,7 +13,7 @@ module GitlabMarkdownHelper def link_to_gfm(body, url, html_options = {}) return "" if body.blank? - escaped_body = if body =~ /\A\<img/ + escaped_body = if body.start_with?('<img') body else escape_once(body) diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb index 96a83671009..b4b4d804203 100644 --- a/app/helpers/tab_helper.rb +++ b/app/helpers/tab_helper.rb @@ -112,7 +112,7 @@ module TabHelper end def profile_tab_class - if controller.controller_path =~ /\Aprofiles/ + if controller.controller_path.start_with?('profiles') return 'active' end |