Commit 7bc4b0bb authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'issue_239356_fix_Rails/ShortI18n' into 'master'

Resolve Rails/ShortI18n rubocop offenses

See merge request gitlab-org/gitlab!81399
parents da92a65c 481b3bc0
......@@ -521,14 +521,6 @@ Rails/RenderInline:
Exclude:
- 'ee/app/controllers/sitemap_controller.rb'
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: conservative, aggressive
Rails/ShortI18n:
Exclude:
- 'app/uploaders/content_type_whitelist.rb'
# Offense count: 1144
# Configuration parameters: ForbiddenMethods, AllowedMethods.
# ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
......
......@@ -30,7 +30,7 @@ module ContentTypeWhitelist
content_type = mime_magic_content_type(new_file.path)
unless whitelisted_content_type?(content_type)
message = I18n.translate(:"errors.messages.content_type_whitelist_error", allowed_types: Array(content_type_whitelist).join(", "))
message = I18n.t(:"errors.messages.content_type_whitelist_error", allowed_types: Array(content_type_whitelist).join(", "))
raise CarrierWave::IntegrityError, message
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment