Sha256: bbb93d1c80f180b775feb57e3847e7c7945163515144d9a4837828eb2937ae63

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 Bytes

Contents

require 'clevic.rb'

# db connection
Clevic::DbOptions.connect do
  database 'accounts_test'
  adapter :postgresql
  username 'accounts'
end

# minimal definition to get combo boxes to show up
class Entry < Clevic::Record
  belongs_to :debit, :class_name => 'Account', :foreign_key => 'debit_id'
  belongs_to :credit, :class_name => 'Account', :foreign_key => 'credit_id'
end

# minimal definition to get sensible values in combo boxes
class Account < Clevic::Record
  def to_s; name; end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
clevic-0.7.0 models/minimal_models.rb