Created
August 26, 2011 16:37
-
-
Save ericallam/1173823 to your computer and use it in GitHub Desktop.
Rails for Zombies 2 – Challenge 5-9
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
<p id="notice"><%= notice %></p> | |
<ul> | |
<li> | |
<em>Name:</em> | |
<%= @weapon.name %> | |
</li> | |
<li> | |
<em>Condition:</em> | |
<span id="condition"><%= @weapon.condition %></span> | |
<%= link_to "Toggle", toggle_condition_user_weapon_path(@user, @weapon), remote: true %> | |
</li> | |
<li> | |
<em>Ammo:</em> | |
<span id="ammo"><%= @weapon.ammo %></span> | |
</li> | |
</ul> | |
<div id="reload_form"> | |
<%= form_for [@user, @weapon], url: reload_user_weapon_path(@user, @weapon) do |f| %> | |
<div class="field"> | |
Number of bullets to reload: | |
<%= number_field_tag :ammo_to_reload, 30 %> <br /> | |
<%= f.submit "Reload" %> | |
</div> | |
<% end %> | |
</div> | |
<%= link_to 'Edit', edit_weapon_path(@weapon) %> | | |
<%= link_to 'Back', weapons_path %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment