Sha256: 219e99b705ffb79a73d1aeeb9f794261070bd371b31fe77aaaf06bcf8988f723
Contents?: true
Size: 601 Bytes
Versions: 16
Compression:
Stored size: 601 Bytes
Contents
require 'clevic.rb' # see sql/accounts.sql for schema # db connection Sequel.connect( "postgres://#{host}/accounts_test?user=#{$options[:username] || 'accounts'}&password=#{$options[:password]}" ) # minimal definition to get combo boxes to show up class Entry < Sequel::Model include Clevic::Record many_to_one :debit, :class_name => 'Account', :foreign_key => 'debit_id' many_to_one :credit, :class_name => 'Account', :foreign_key => 'credit_id' end # minimal definition to get sensible values in combo boxes class Account < Sequel::Model include Clevic::Record def to_s; name; end end
Version data entries
16 entries across 16 versions & 1 rubygems