<%= link_to "Back to all accounts", root_path %>
Deposit in <%= @account.name %>'s Account
Balance: <%= @account.balance %>
<% if @deposit.errors.present? %>
<% @deposit.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
<% end %>
<%= form_for @deposit, :as => :deposit, :url => account_deposit_path(@account) do |f| %>
<%= f.label :amount %>
<%= f.text_field :amount %>
<%= f.submit "Deposit" %>
<% end %>