Sha256: 202536b45f59048ff4382d56ce71d462db55fc71e1f61adb07e50d1fef5a233b
Contents?: true
Size: 351 Bytes
Versions: 16
Compression:
Stored size: 351 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] has_many :readings, :primary_key => :user_id, :foreign_key => :user_id end
Version data entries
16 entries across 16 versions & 1 rubygems