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

Version Path
clevic-0.14.6 models/minimal_models.rb
clevic-0.14.5 models/minimal_models.rb
clevic-0.14.4 models/minimal_models.rb
clevic-0.14.3 models/minimal_models.rb
clevic-0.14.2 models/minimal_models.rb
clevic-0.14.1 models/minimal_models.rb
clevic-0.14.0 models/minimal_models.rb
clevic-0.13.0.b12 models/minimal_models.rb
clevic-0.13.0.b11 models/minimal_models.rb
clevic-0.13.0.b10 models/minimal_models.rb
clevic-0.13.0.b9 models/minimal_models.rb
clevic-0.13.0.b6 models/minimal_models.rb
clevic-0.13.0.b5 models/minimal_models.rb
clevic-0.13.0.b3 models/minimal_models.rb
clevic-0.13.0.b2 models/minimal_models.rb
clevic-0.13.0.b1 models/minimal_models.rb