Sha256: 29ee9223e0931189010694aa94d327e95d34dc5e28749edb655247f1d5827179

Contents?: true

Size: 288 Bytes

Versions: 18

Compression:

Stored size: 288 Bytes

Contents

class Membership < ActiveRecord::Base
  self.primary_keys = :user_id, :group_id
  belongs_to :user
	belongs_to :group
	has_many :statuses, :class_name => 'MembershipStatus', :foreign_key => [:user_id, :group_id]
  has_many :readings, :primary_key => :user_id, :foreign_key => :user_id
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
composite_primary_keys-11.0.0.rc2 test/fixtures/membership.rb
composite_primary_keys-7.0.15 test/fixtures/membership.rb
composite_primary_keys-8.1.1 test/fixtures/membership.rb
composite_primary_keys-7.0.14 test/fixtures/membership.rb
composite_primary_keys-8.1.0 test/fixtures/membership.rb
composite_primary_keys-7.0.13 test/fixtures/membership.rb
composite_primary_keys-8.0.0 test/fixtures/membership.rb
composite_primary_keys-7.0.12 test/fixtures/membership.rb
composite_primary_keys-7.0.11 test/fixtures/membership.rb
composite_primary_keys-7.0.10 test/fixtures/membership.rb
composite_primary_keys-7.0.9 test/fixtures/membership.rb
composite_primary_keys-7.0.8 test/fixtures/membership.rb
composite_primary_keys-7.0.7 test/fixtures/membership.rb
composite_primary_keys-7.0.6 test/fixtures/membership.rb
composite_primary_keys-7.0.5 test/fixtures/membership.rb
composite_primary_keys-7.0.4 test/fixtures/membership.rb
composite_primary_keys-7.0.3 test/fixtures/membership.rb
composite_primary_keys-7.0.2 test/fixtures/membership.rb