post versions: fix index action when no versions exist.
Fix a nil dereference error during testing when no post versions exist.
This commit is contained in:
@@ -19,7 +19,10 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "posts/partials/common/inline_blacklist" %>
|
<%= render "posts/partials/common/inline_blacklist" %>
|
||||||
<p class="fineprint">Recent updates may not have been processed yet. The most recently processed version was <%= time_ago_in_words_tagged(PostVersion.maximum(:updated_at)) %>.</p>
|
<p class="fineprint">
|
||||||
|
Recent updates may not have been processed yet. The
|
||||||
|
most recently processed version was <%= time_ago_in_words_tagged(PostVersion.maximum(:updated_at) || Time.zone.now) %>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<% if @post_versions.length == 0 %>
|
<% if @post_versions.length == 0 %>
|
||||||
<%= render "post_sets/blank" %>
|
<%= render "post_sets/blank" %>
|
||||||
|
|||||||
Reference in New Issue
Block a user