user2732663
user2732663

Reputation: 833

ROR paper_trial display all changes

Hi I'm pretty new to rails, and brand new to paper_trail.

I'm trying to display a simple table of all changes made from the versions table and display in a view

    <table class="table">
    <tr>
        <th>Type</th>
        <th>Modified at</th>
    </tr>       
    <% PaperTrail::Version.order('id desc') do |v| %>
        <tr> 
            <td> <%= v.item_type.underscore.humanize %> </td>
            <td> <%= v.created_at.to_s %></td>
        </tr>       
    <% end %>       
</table>

unfortunately this renders the table headers but not the table body, any insight would be appreciated.

Upvotes: 0

Views: 333

Answers (1)

fotanus
fotanus

Reputation: 20116

It is mising the each method call,

<% PaperTrail::Version.order('id desc').each do |v| %>

Upvotes: 2

Related Questions