Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SafeBalancesController < ApplicationController
- def index
- @additions = Addition.find(:all)
- @deposits = Deposit.find(:all)
- @pettycashes = Pettycash.find(:all)
- @registers = Register.find(:all)
- @safe_balances = SafeBalance.find(:all)
- respond_to do |format|
- format.html # index.html.erb
- format.xml { render :xml => @safe_balances }
- end
- end
- # GET /registers/1
- # GET /registers/1.xml
- def show
- @safe_balance = @business_day.safe_balance
- respond_to do |format|
- format.html # show.html.erb
- format.xml { render :xml => @safe_balance }
- end
- end
- def update
- @safe_balance = @business_day.safe_balance
- respond_to do |format|
- if @safe_balance.update_attributes(params[:safe_balance])
- flash[:notice] = 'Safe Balance was successfully updated.'
- format.html { redirect_to(safe_balances_path) }
- format.xml { head :ok }
- else
- format.html { render :action => "edit" }
- format.xml { render :xml => @safe_balance.errors, :status => :unprocessable_entity }
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment