Skip to content

Instantly share code, notes, and snippets.

View russellkt's full-sized avatar

Kevin Russell russellkt

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<name>beach_boundary.kml</name>
<Style id="sh_ylw-pushpin_copy5">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
class ChecksController < ApplicationController#ProtectedController
#permit "data_entry or admin or accountant", :except => [:index, :show]
before_filter :setup, :only => [:new, :create, :edit, :update]
before_filter :load_batch
protected
def load_batch
@batch = Batch.find_by_id(params[:batch_id])
end
ArgumentError in ChecksController#create
wrong number of arguments (2 for 1)
RAILS_ROOT: /Users/ktrussell/rails_projects/ledger
Application Trace | Framework Trace | Full Trace
app/controllers/checks_controller.rb:49:in `method_missing'
app/controllers/checks_controller.rb:49:in `create'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:106:in `call'
ActionController::DoubleRenderError in ChecksController#create
Can only render or redirect once per action
RAILS_ROOT: /Users/ktrussell/rails_projects/ledger
Application Trace | Framework Trace | Full Trace
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:838:in `render_with_no_layout'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/layout.rb:251:in `render_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in `render'
def create
params[:check][:transaction_type] = 'check'
@check = AccountingTransaction.new( params[:check] )
respond_to do |format|
if @check.save
flash[:notice] = 'Check was successfully posted.'
format.html { redirect_to( create_success_url( params[:commit] ) ) }
format.xml { head :created, :location => check_url(@check) }
else
flash.now[:error] = 'Check could not be saved'
import java.sql.*
import com.ibm.as400.access.*
class DbMetaClass{
Connection c = null
DatabaseMetaData dbMeta = null
String[] types =["TABLE", "VIEW"]
DbMetaClass(){
Class.forName("com.ibm.as400.access.AS400JDBCDriver")