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
kovyrin-composite_primary_keys-2.3.2 test/fixtures/department.rb
mingusbabcock-composite_primary_keys-2.2.2.1 test/fixtures/department.rb
tyler-composite_primary_keys-1.1.0 test/fixtures/department.rb
tyler-composite_primary_keys-1.1.1 test/fixtures/department.rb
tyler-composite_primary_keys-1.1.2 test/fixtures/department.rb
tyler-composite_primary_keys-1.1.3 test/fixtures/department.rb
tyler-composite_primary_keys-1.1.4 test/fixtures/department.rb
composite_primary_keys-3.1.6 test/fixtures/department.rb
composite_primary_keys-3.1.5 test/fixtures/department.rb
composite_primary_keys-3.1.4 test/fixtures/department.rb
composite_primary_keys-3.1.2 test/fixtures/department.rb
composite_primary_keys-3.1.1 test/fixtures/department.rb
composite_primary_keys-3.1.0 test/fixtures/department.rb
composite_primary_keys-3.0.9 test/fixtures/department.rb
composite_primary_keys-3.0.8 test/fixtures/department.rb
composite_primary_keys-3.0.7 test/fixtures/department.rb
composite_primary_keys-3.0.4 test/fixtures/department.rb
composite_primary_keys-3.0.3 test/fixtures/department.rb
composite_primary_keys-3.0.0.b3 test/fixtures/department.rb
composite_primary_keys-3.0.0.b2 test/fixtures/department.rb