Commit 32e24b65 authored by charlieablett's avatar charlieablett

Refactor AttributeCleaner` for readability

parent 92388917
......@@ -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)
......
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