I've searched through the site on how to accomplish this and many answers point towards using the changed?
method. I'm trying to notify users of an update after persisting the DB so unfortunately this won't work.
I then found the previous_changes
method but this also triggers when a post is first created. The goal for is to do this only edit actions. How can this be done?
<% if @post.previous_changes %>
<span>Updated:</span> <span><%= time_ago_in_words(@post.updated_at) %> ago</span>
<% end %>