Sha256: 84acc80c87e2c48971be36b6b265834f8131b88c42bd9d91c07a73043b8263e8

Contents?: true

Size: 278 Bytes

Versions: 33

Compression:

Stored size: 278 Bytes

Contents

class Membership < ActiveRecord::Base
  # set_primary_keys *keys - turns on composite key functionality
  set_primary_keys :user_id, :group_id
  belongs_to :user
	belongs_to :group
	has_many :statuses, :class_name => 'MembershipStatus', :foreign_key => [:user_id, :group_id]
end

Version data entries

33 entries across 33 versions & 4 rubygems

Version Path
kovyrin-composite_primary_keys-2.3.2 test/fixtures/membership.rb
mingusbabcock-composite_primary_keys-2.2.2.1 test/fixtures/membership.rb
tyler-composite_primary_keys-1.1.0 test/fixtures/membership.rb
tyler-composite_primary_keys-1.1.1 test/fixtures/membership.rb
tyler-composite_primary_keys-1.1.2 test/fixtures/membership.rb
tyler-composite_primary_keys-1.1.3 test/fixtures/membership.rb
tyler-composite_primary_keys-1.1.4 test/fixtures/membership.rb
composite_primary_keys-2.3.2 test/fixtures/membership.rb
composite_primary_keys-0.8.0 test/fixtures/membership.rb
composite_primary_keys-0.8.2 test/fixtures/membership.rb
composite_primary_keys-0.8.5 test/fixtures/membership.rb
composite_primary_keys-0.8.6 test/fixtures/membership.rb
composite_primary_keys-0.9.0 test/fixtures/membership.rb
composite_primary_keys-0.9.90 test/fixtures/membership.rb
composite_primary_keys-0.9.91 test/fixtures/membership.rb
composite_primary_keys-1.0.0 test/fixtures/membership.rb
composite_primary_keys-1.0.1 test/fixtures/membership.rb
composite_primary_keys-1.0.10 test/fixtures/membership.rb
composite_primary_keys-1.0.3 test/fixtures/membership.rb
composite_primary_keys-0.8.4 test/fixtures/membership.rb