diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-26 12:06:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-26 12:06:04 +0300 |
commit | 759cd6c2985088d187ed519f2a881c2c690b34ec (patch) | |
tree | 183e291c0404bf9b3ac7638be6fa1fe94b7d2d14 /app/models/wiki_page.rb | |
parent | 9735395f94088df7e6470e3e8a2638385ede36b6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r-- | app/models/wiki_page.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index cd4c7895587..1fa29e5b933 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -77,11 +77,7 @@ class WikiPage # The escaped URL path of this page. def slug - if @attributes[:slug].present? - @attributes[:slug] - else - wiki.wiki.preview_slug(title, format) - end + @attributes[:slug].presence || wiki.wiki.preview_slug(title, format) end alias_method :to_param, :slug |