````ruby
def update
  @account = current_user.accounts.find(params[:id)
  if @account.update_attributes(params[:account])
    redirect_to @account, notice: 'Account was successfully updated.'
  else
    render :edit
  end
end
````