Skip to content

Commit

Permalink
Merge pull request #1410 from Nexmo/display-correct-date-on-blogpost
Browse files Browse the repository at this point in the history
FIX: display updated_at first, otherwise published_at date + bump sta…
  • Loading branch information
marcoranieri authored May 24, 2022
2 parents c206250 + 394fb75 commit 5e157d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/nexmo_developer/app/views/blog/blogpost/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@
<% end %>

<!-- Last Updated at -->
<% if @blogpost.updated_at.present? %>
<p class='Vlt-grey-darker'><strong>Last updated on <%= @blogpost.updated_at.strftime('%b %d, %Y') %></strong></p>
<% end %>
<% updated = @blogpost.updated_at.present? ? @blogpost.updated_at : @blogpost.published_at %>
<p class='Vlt-grey-darker'><strong>Last updated on <%= updated.strftime('%b %d, %Y') %></strong></p>

<!-- Raw content -->
<div class="raw_blopost_content"><%= raw @blogpost.content %></div>
Expand Down
2 changes: 1 addition & 1 deletion lib/nexmo_developer/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module NexmoDeveloper
VERSION = '0.2.5'.freeze
VERSION = '0.2.6'.freeze
end

0 comments on commit 5e157d4

Please sign in to comment.