summaryrefslogtreecommitdiff
path: root/app/models/concerns/cache_markdown_field.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-07-05 18:25:45 +0100
committerNick Thomas <nick@gitlab.com>2017-07-05 18:25:45 +0100
commit6d63d766d12d92095b781cab7162ba41f23557f3 (patch)
treeede03b7c58ce99b4c9d0dc1f28427d071b18b124 /app/models/concerns/cache_markdown_field.rb
parent98768953f31d9b4f243c52e4dd5579f21cb7976f (diff)
downloadgitlab-ce-6d63d766d12d92095b781cab7162ba41f23557f3.tar.gz
Fix stubbing attributes alongside cache_markdown_field
Diffstat (limited to 'app/models/concerns/cache_markdown_field.rb')
-rw-r--r--app/models/concerns/cache_markdown_field.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/cache_markdown_field.rb b/app/models/concerns/cache_markdown_field.rb
index eb32bf3d32a..95152dcd68c 100644
--- a/app/models/concerns/cache_markdown_field.rb
+++ b/app/models/concerns/cache_markdown_field.rb
@@ -78,7 +78,7 @@ module CacheMarkdownField
def cached_html_up_to_date?(markdown_field)
html_field = cached_markdown_fields.html_field(markdown_field)
- cached = !cached_html_for(markdown_field).nil? && !__send__(markdown_field).nil?
+ cached = cached_html_for(markdown_field).present? && __send__(markdown_field).present?
return false unless cached
markdown_changed = attribute_changed?(markdown_field) || false