Sha256: 60eda045484af02e8900b57305e57f3e22b3c9a56835718ad84c49862735ecef

Contents?: true

Size: 304 Bytes

Versions: 50

Compression:

Stored size: 304 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

50 entries across 50 versions & 1 rubygems

Version Path
composite_primary_keys-8.1.4 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.0 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.0.beta1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-8.1.3 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-8.1.2 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.16 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.15 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-8.1.1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.14 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-8.1.0 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.13 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-6.0.8 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-8.0.0 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.12 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.11 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-6.0.7 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.10 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.9 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.8 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.7 test/fixtures/reference_code_using_composite_key_alias.rb