Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: None  |  size: 0.59 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <h1>Listing pessoas</h1>
  2.  
  3. <table>
  4.   <tr>
  5.     <th>Nome</th>
  6.     <th>Idade</th>
  7.     <th></th>
  8.     <th></th>
  9.     <th></th>
  10.   </tr>
  11.  
  12. <% @pessoas.each do |pessoa| %>
  13.   <tr>
  14.     <td><%= pessoa.nome %></td>
  15.     <td><%= pessoa.idade %></td>
  16.     <td><%= link_to 'Show', pessoa %></td>
  17.     <td><%= link_to 'Edit', edit_pessoa_path(pessoa) %></td>
  18.     <td><%= link_to 'Destroy', pessoa, :confirm => 'Are you sure?', :method => :delete %></td>
  19.   </tr>
  20. <% end %>
  21. </table>
  22.  
  23. <br />
  24.  
  25. <%= link_to 'New Pessoa', new_pessoa_path %>
  26.  
  27. <script>
  28.   setInterval("$.post('/observe_model', {model:'Pessoa'} );", 5000);
  29. </script>