diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-02 19:11:26 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-02 19:11:26 +0200 |
commit | 4cfa5ce4a95379a9ebe08f57b170af4b5ee9a9a5 (patch) | |
tree | cf94edeb5c02688e6e07ad8e27ceb1a6345b100c /app/models/application_setting.rb | |
parent | 1e8dbd46758d5c9772baf233ebcff889dc742d3d (diff) | |
download | gitlab-ce-4cfa5ce4a95379a9ebe08f57b170af4b5ee9a9a5.tar.gz |
Enable the Style/PreferredHashMethods coprc/enable-PreferredHashMethods-cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r-- | app/models/application_setting.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 3d12f3c306b..9e04976e8fd 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -143,7 +143,7 @@ class ApplicationSetting < ActiveRecord::Base validates_each :restricted_visibility_levels do |record, attr, value| value&.each do |level| - unless Gitlab::VisibilityLevel.options.has_value?(level) + unless Gitlab::VisibilityLevel.options.value?(level) record.errors.add(attr, "'#{level}' is not a valid visibility level") end end @@ -151,7 +151,7 @@ class ApplicationSetting < ActiveRecord::Base validates_each :import_sources do |record, attr, value| value&.each do |source| - unless Gitlab::ImportSources.options.has_value?(source) + unless Gitlab::ImportSources.options.value?(source) record.errors.add(attr, "'#{source}' is not a import source") end end |