Posted By

brandonjp on 02/02/11


Tagged

link rails ruby a href


Versions (?)

Ruby / Rails - links ( full element ) to Show Edit Destroy Delete records in view *.erb


 / Published in: Ruby
 

  1. <% @colors.each do |color| %>
  2.  
  3. <table>
  4. <tr>
  5. <td><%= link_to 'Show', color %></td>
  6. <td><%= link_to 'Edit', edit_color_path(color) %></td>
  7. <td><%= link_to 'Destroy', color, :confirm => 'Are you sure?', :method => :delete %></td>
  8. </tr>
  9. </table>
  10.  
  11. <% end %>

Report this snippet  

You need to login to post a comment.