%h1 Listing metapurses

%table
  %thead
    %tr
      %th Name
      -# %th Data
      - if policy(Metapurse).new?
        -# %th
        %th
        %th

  %tbody
    - @metapurses.each do |metapurse|
      %tr
        %td
          = link_to metapurse.name, metapurse
          -# = "#{number_to_currency metapurse.total_usd} USD"
        -# %td= metapurse.data
        - if policy(metapurse).update?
          -# %td= link_to 'Show', metapurse
          %td= link_to 'Edit', edit_metapurse_path(metapurse)
          %td= link_to 'Destroy', metapurse, method: :delete, data: { confirm: 'Are you sure?' }

%br

= link_to 'New Metapurse', new_metapurse_path
