Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
481b3bc0
Commit
481b3bc0
authored
Feb 23, 2022
by
Siddharth Asthana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve Rails/ShortI18n rubocop offenses
Changelog: other
parent
b43d9482
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
.rubocop_todo.yml
.rubocop_todo.yml
+0
-8
app/uploaders/content_type_whitelist.rb
app/uploaders/content_type_whitelist.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
481b3bc0
...
...
@@ -572,14 +572,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
...
...
app/uploaders/content_type_whitelist.rb
View file @
481b3bc0
...
...
@@ -30,7 +30,7 @@ module ContentTypeWhitelist
content_type
=
mime_magic_content_type
(
new_file
.
path
)
unless
whitelisted_content_type?
(
content_type
)
message
=
I18n
.
t
ranslate
(
:"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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment