diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-13 16:17:52 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-13 16:17:52 +0100 |
commit | c047fb860bba74acf49e67c228d1f83a18b691ad (patch) | |
tree | 948984b697b970fa707ade8d5add7950e323f400 /app/validators | |
parent | b413a825b129122d93230203db52902e74821495 (diff) | |
download | gitlab-ce-c047fb860bba74acf49e67c228d1f83a18b691ad.tar.gz |
Disable public send cop in variables duplicates validator
Diffstat (limited to 'app/validators')
-rw-r--r-- | app/validators/variable_duplicates_validator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/variable_duplicates_validator.rb b/app/validators/variable_duplicates_validator.rb index 9c7fa86ed5b..a5fa42aea24 100644 --- a/app/validators/variable_duplicates_validator.rb +++ b/app/validators/variable_duplicates_validator.rb @@ -6,7 +6,7 @@ class VariableDuplicatesValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if options[:scope] - scoped = value.group_by { |variable| Array(options[:scope]).map { |attr| variable.send(attr) } } + scoped = value.group_by { |variable| Array(options[:scope]).map { |attr| variable.send(attr) } } # rubocop:disable GitlabSecurity/PublicSend scoped.each_value { |scope| validate_duplicates(record, attribute, scope) } else validate_duplicates(record, attribute, value) |