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-7.0.6 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.5 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.4 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.3 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.2 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-7.0.0 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-6.0.6 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-6.0.5 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-6.0.3 test/fixtures/reference_code_using_composite_key_alias.rb