Skip to content

Instantly share code, notes, and snippets.

@wildjcrt
Forked from xdite/gist:321561
Created March 4, 2010 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wildjcrt/321615 to your computer and use it in GitHub Desktop.
Save wildjcrt/321615 to your computer and use it in GitHub Desktop.
<%= render_table(@products,
[
["ID", lambda { |p| p.id }],
["名稱", lambda { |p| p.name }],
["動作", lambda { |p|
link_to("Show", admin_product_path(p)) + ' | ' +
link_to("Edit", edit_admin_product_path(p)) + ' | ' +
link_to("Delete", admin_product_path(p), :confirm => "Are you sure?", :method => :delete )}]
],
:class_name => "table"
) %>
<%= will_paginate @products %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment