Sha256: 10ae22fce096d61ad4a345305ff9e8a6237914d31cdfda9574d2686b77a109a2

Contents?: true

Size: 294 Bytes

Versions: 53

Compression:

Stored size: 294 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

53 entries across 53 versions & 1 rubygems

Version Path
composite_primary_keys-13.0.0 test/fixtures/membership.rb
composite_primary_keys-12.0.10 test/fixtures/membership.rb
composite_primary_keys-12.0.9 test/fixtures/membership.rb
composite_primary_keys-12.0.8 test/fixtures/membership.rb
composite_primary_keys-12.0.6 test/fixtures/membership.rb
composite_primary_keys-12.0.5 test/fixtures/membership.rb
composite_primary_keys-12.0.4 test/fixtures/membership.rb
composite_primary_keys-12.0.3 test/fixtures/membership.rb
composite_primary_keys-12.0.2 test/fixtures/membership.rb
composite_primary_keys-11.3.1 test/fixtures/membership.rb
composite_primary_keys-8.1.8 test/fixtures/membership.rb
composite_primary_keys-12.0.1 test/fixtures/membership.rb
composite_primary_keys-12.0.0 test/fixtures/membership.rb
composite_primary_keys-12.0.0.rc5 test/fixtures/membership.rb
composite_primary_keys-12.0.0.rc4 test/fixtures/membership.rb
composite_primary_keys-12.0.0.rc3 test/fixtures/membership.rb
composite_primary_keys-12.0.0.rc2 test/fixtures/membership.rb
composite_primary_keys-12.0.0.rc1 test/fixtures/membership.rb
composite_primary_keys-8.1.7 test/fixtures/membership.rb
composite_primary_keys-11.2.0 test/fixtures/membership.rb