Sha256: c10248fddb5435ef8fd509be2d9ed241126a7b3bb61e44910d4323194577bfe4
Contents?: true
Size: 467 Bytes
Versions: 15
Compression:
Stored size: 467 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 :active_statuses, -> { where('membership_statuses.status = ?', 'Active') }, :class_name => 'MembershipStatus', :foreign_key => [:user_id, :group_id] has_many :readings, :primary_key => :user_id, :foreign_key => :user_id end
Version data entries
15 entries across 15 versions & 1 rubygems