Created
March 11, 2010 12:33
-
-
Save wildjcrt/329094 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= render_table(@games, | |
[ | |
["ID", lambda { |p| p.id }], | |
["遊戲名稱", lambda { |p| p.name }], | |
["標籤", lambda { |p| p.tag_list.join(" | ") }], | |
["動作", lambda { |p| | |
add_to_favorites_status_bar(p) + ' | ' + | |
unless current_user | |
link_to("Show", game_path(p)) + ' | ' + | |
end | |
link_to("Edit", edit_game_path(p)) + ' | ' + | |
link_to("Delete", game_path(p), :confirm => "Are you sure?", :method => :delete ) | |
}] | |
], | |
:class_name => "table") | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment