Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-02-07 17:16:46 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-02-07 17:16:46 +0300
commit128b1eae092e4ee9384c99a4ba72b9122fc17e89 (patch)
tree8eab2084903f6455c40e969cbc3d8ef02582288e /app/models/wiki_page.rb
parent68db614d17c3ad984f7a5698d02475f71bde8941 (diff)
Update Rubocop to ruby 2.3
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r--app/models/wiki_page.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb
index c3de278f5b7..e93d0eab6d8 100644
--- a/app/models/wiki_page.rb
+++ b/app/models/wiki_page.rb
@@ -69,16 +69,12 @@ class WikiPage
# The raw content of this page.
def content
- @attributes[:content] ||= if @page
- @page.text_data
- end
+ @attributes[:content] ||= @page&.text_data
end
# The processed/formatted content of this page.
def formatted_content
- @attributes[:formatted_content] ||= if @page
- @page.formatted_data
- end
+ @attributes[:formatted_content] ||= @page&.formatted_data
end
# The markup format for the page.