Skip to content

Commit 291e83c

Browse files
committed
not_found page should be aware of whether the user or post has been requested
1 parent c968ead commit 291e83c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/views/errors/not_found.html.erb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55

66
<p class="is-lead">The page you're looking for couldn't be found.</p>
77

8-
<p>You might have followed an old link, or a post might have been deleted.</p>
8+
<%
9+
is_user = request.original_fullpath.include?(user_path)
10+
%>
911

12+
<p>You might have followed an old link, or the <%= is_user ? 'user' : 'post' %> might have been deleted.</p>
1013

1114
<p>
1215
<%= link_to 'Go back', :back, class: 'button is-outlined' %>
1316
<%= link_to 'Go home', root_path, class: 'button is-outlined' %>
14-
</p>
17+
</p>

0 commit comments

Comments
 (0)