gitlab-org--gitlab-foss/app/views/projects/wikis/_pages_wiki_page.html.haml
Nick Thomas d66066f7cb
Harden the wiki against missing last_versions
Currently, we assume a "last_version" always exists for a wiki page.
In production, this is not always true. So, guard uses of it with a
null check.
2018-10-17 13:24:52 +01:00

6 lines
274 B
Text

%li
= link_to wiki_page.title, project_wiki_path(@project, wiki_page)
%small (#{wiki_page.format})
.float-right
- if wiki_page.last_version
%small= (s_("Last edited %{date}") % { date: time_ago_with_tooltip(wiki_page.last_version.authored_date) }).html_safe