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-9.0.9 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.0.rc2 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-10.0.3 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.0.rc1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.0.beta4 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.0.beta3 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.0.beta2 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-11.0.0.beta1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-10.0.2 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-10.0.1 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.8 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-10.0.0 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.7 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-8.1.6 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.6 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.5 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-8.1.5 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.4 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.2 test/fixtures/reference_code_using_composite_key_alias.rb
composite_primary_keys-9.0.1 test/fixtures/reference_code_using_composite_key_alias.rb