Sha256: 93cb22a87bc9cc4034a36c6e16d742b1558320c591eec841a3aa538dc33d5ff8
Contents?: true
Size: 463 Bytes
Versions: 5
Compression:
Stored size: 463 Bytes
Contents
class TransfersController < ApplicationController def new @accounts = Account.all @transfer = Account::Transfer.new end def create @transfer = Account::Transfer.new(params[:transfer]) if @transfer.call.success? redirect_to root_path, :notice => "Transferred #{@transfer.amount} from #{@transfer.from.name}'s account to #{@transfer.to.name}'s account." else @accounts = Account.all render :new end end end
Version data entries
5 entries across 5 versions & 1 rubygems