<%= version.event %> <%= version.item_type %> <%= version.item_id %> <%= change_item_link(version) %> <% if PaperTrailManager.whodunnit_class && version.whodunnit %> <% if user = PaperTrailManager.whodunnit_class.find(version.whodunnit) rescue nil %> by <%= link_to(h(user.send(PaperTrailManager.whodunnit_name_method)), user_path(user)) %> <% end %> <% end %> <% if change_revert_allowed?(version) %> <%= link_to 'Roll back', change_path(version), :method => 'put', :confirm => 'Are you sure?', :class => 'rollback' %> <% end %>
<% if version.event == 'update' or version.event == 'create' %> <% changes = changes_for(version) %><%= key %> | <%= text_or_nil(changes[key][:previous]) %> | → | <%= text_or_nil(changes[key][:current]) %> |