Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h1>Listing pessoas</h1>
- <table>
- <tr>
- <th>Nome</th>
- <th>Idade</th>
- <th></th>
- <th></th>
- <th></th>
- </tr>
- <% @pessoas.each do |pessoa| %>
- <tr>
- <td><%= pessoa.nome %></td>
- <td><%= pessoa.idade %></td>
- <td><%= link_to 'Show', pessoa %></td>
- <td><%= link_to 'Edit', edit_pessoa_path(pessoa) %></td>
- <td><%= link_to 'Destroy', pessoa, :confirm => 'Are you sure?', :method => :delete %></td>
- </tr>
- <% end %>
- </table>
- <br />
- <%= link_to 'New Pessoa', new_pessoa_path %>
- <script>
- setInterval("$.post('/observe_model', {model:'Pessoa'} );", 5000);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment