Letters <%= link_to letters_path, class: 'btn refresh' do %> Refresh <% end %> <%= link_to clear_letters_path, method: 'delete', data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' do %> Clear <% end %>

<% if first_letter = @letters.shift %> <% end %> <% @letters.each do |letter| %> <% end %>
ID Sent at Action
<%= link_to(first_letter.id, letter_path(first_letter, style: first_letter.default_style), target: 'mail') %> <%= first_letter.sent_at %> <%= link_to delete_letter_path(first_letter), method: 'delete', data: { confirm: 'Are you sure you want to delete this email?' } do %> <% end %>
<%= link_to(letter.id, letter_path(letter, style: letter.default_style), target: 'mail') %> <%= letter.sent_at %> <%= link_to delete_letter_path(letter), :method => 'delete', data: { confirm: 'Are you sure you want to delete this email?' } do %> <% end %>