Sha256: 37cbb6faf18e13c90a6605906d0f4437cb39e030edbcabefbe7aa09edc13fe60

Contents?: true

Size: 312 Bytes

Versions: 20

Compression:

Stored size: 312 Bytes

Contents

class ReferenceCodeUsingCompositeKeyAlias < ActiveRecord::Base
  self.table_name = 'reference_codes'
  self.primary_key = [:reference_type_id, :reference_code]
  
  belongs_to :reference_type, :foreign_key => "reference_type_id"
  
  validates_presence_of :reference_code, :code_label, :abbreviation
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
composite_primary_keys-12.0.2 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.3.1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-8.1.8 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-12.0.1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-12.0.0 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-12.0.0.rc5 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-12.0.0.rc4 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-12.0.0.rc3 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-12.0.0.rc2 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-12.0.0.rc1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-8.1.7 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.2.0 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.1.0 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.3 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.2 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-10.0.5 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.10 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.0 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-10.0.4 test/fixtures/reference_code_using_composite_key_alias.rb