Sha256: e58c82da60da992d058beeed835ca2481cd4832224768c05cf08202829b12846

Contents?: true

Size: 226 Bytes

Versions: 43

Compression:

Stored size: 226 Bytes

Contents

class Department < ActiveRecord::Base
  # set_primary_keys *keys - turns on composite key functionality
  set_primary_keys :department_id, :location_id
  has_many :employees, :foreign_key => [:department_id, :location_id]
end

Version data entries

43 entries across 43 versions & 5 rubygems

Version Path
globe-composite_primary_keys-3.0.1 test/fixtures/department.rb
composite_primary_keys-2.3.5.1 test/fixtures/department.rb
composite_primary_keys-2.3.5 test/fixtures/department.rb
composite_primary_keys-2.3.2 test/fixtures/department.rb
composite_primary_keys-1.0.10 test/fixtures/department.rb
composite_primary_keys-1.0.0 test/fixtures/department.rb
composite_primary_keys-1.0.2 test/fixtures/department.rb
composite_primary_keys-1.0.3 test/fixtures/department.rb
composite_primary_keys-0.9.0 test/fixtures/department.rb
composite_primary_keys-0.9.90 test/fixtures/department.rb
composite_primary_keys-0.9.91 test/fixtures/department.rb
composite_primary_keys-0.9.93 test/fixtures/department.rb
composite_primary_keys-1.0.1 test/fixtures/department.rb
composite_primary_keys-0.9.92 test/fixtures/department.rb
composite_primary_keys-2.2.1 test/fixtures/department.rb
composite_primary_keys-2.2.0 test/fixtures/department.rb
composite_primary_keys-1.0.8 test/fixtures/department.rb
composite_primary_keys-1.0.7 test/fixtures/department.rb
composite_primary_keys-1.0.4 test/fixtures/department.rb
composite_primary_keys-2.2.2 test/fixtures/department.rb