diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-10 19:39:26 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-14 19:14:11 +0300 |
commit | 260c8da060a6039cbd47cfe31c8ec6d6f9b43de0 (patch) | |
tree | bd6dd444c6f416c7209d88bf80e0e9322037758d /app/helpers/commits_helper.rb | |
parent | a64760d6d0a9bc0ce0747de349d37f3c46a1c221 (diff) |
Whitelist or fix additional `Gitlab/PublicSend` cop violations
An upcoming update to rubocop-gitlab-security added additional
violations.
Diffstat (limited to 'app/helpers/commits_helper.rb')
-rw-r--r-- | app/helpers/commits_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 69220a1c0f6..72e26b64e60 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -128,10 +128,10 @@ module CommitsHelper # avatar: true will prepend the avatar image # size: size of the avatar image in px def commit_person_link(commit, options = {}) - user = commit.send(options[:source]) + user = commit.public_send(options[:source]) # rubocop:disable GitlabSecurity/PublicSend - source_name = clean(commit.send "#{options[:source]}_name".to_sym) - source_email = clean(commit.send "#{options[:source]}_email".to_sym) + source_name = clean(commit.public_send(:"#{options[:source]}_name")) # rubocop:disable GitlabSecurity/PublicSend + source_email = clean(commit.public_send(:"#{options[:source]}_email")) # rubocop:disable GitlabSecurity/PublicSend person_name = user.try(:name) || source_name |