public
Created

index

  • Download Gist
index.erb
HTML+ERB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<% if @quotes.any? %>
<table class="table table-striped">
<tbody>
<% @quotes.each do |quote| %>
<tr>
<td><%= quote.content %></td>
<td><%= link_to 'Excluir', quote_path(quote), method: :delete, confirm: 'Tem certeza?', class: 'btn' %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<div class="well">Nenhuma frase cadastrada.</div>
<% end %>
 
<%= link_to 'Cadastre uma frase', new_quote_path, class: 'btn btn-primary' %>
<%= link_to 'Voltar ao inĂ­cio', root_path, class: 'btn btn-primary' %>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.