Created
April 29, 2010 10:01
-
-
Save mdeiters/383390 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<%= javascript_include_tag :defaults %> |
This file contains hidden or 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
<td> | |
<%= link_to 'Edit', edit_game_path(game) %> | | |
<%= link_to_remote 'Delete', | |
:url => game_path(game), | |
:method => :delete, | |
:confirm => 'Are you sure you want to delete?' %> | |
</td> |
This file contains hidden or 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
def destroy | |
@game = Game.find(params[:id]) | |
@game.destroy | |
render :js => "$('#{dom_id(@game)}').remove();" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment