Skip to content
Snippets Groups Projects
Commit 45c68b5a authored by Charlie Ablett's avatar Charlie Ablett
Browse files

Refactor AttributeCleaner` for readability

parent 4b92cb50
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -24,14 +24,9 @@ module Gitlab
private
 
def prohibited_key?(key)
return false if allowed_reference?(key)
return false if permitted_key?(key)
 
return true if 'cached_markdown_version'.equal?(key)
prohibited_suffixes = %w(_id _html)
prohibited_suffixes.any? do |suffix|
true if key.end_with?(suffix)
end
'cached_markdown_version' == key || PROHIBITED_SUFFIXES.any? {|suffix| key.end_with?(suffix)}
end
 
def allowed_reference?(key)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment