Skip to content

Instantly share code, notes, and snippets.

Created October 8, 2011 19:06
Show Gist options
  • Save anonymous/1272716 to your computer and use it in GitHub Desktop.
Save anonymous/1272716 to your computer and use it in GitHub Desktop.
View
<%= link_to "New Link", :controller => :links, :action => :new %>
<table>
<% @links.each do |link| %>
<tr>
<td> <%= link_to '+', up_link_url(link), :method => :put %> <%= link.points %> <%= link_to '-', down_link_url(link), :method => :put %> </td>
<td> <a href= "<%= link.url %>"> <%= link.title %></a> </td>
<td><%= link_to 'Destroy', link, :confirm => 'Are you sure?', :method => :delete %></td>
<td><%= link_to 'Edit', edit_link_path(link) %></td>
</tr>
<% end %>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment