Sha256: 0015549216a1ed848bb5e57b5ee871d5590c7777de6745af580aef5aed28c29d
Contents?: true
Size: 435 Bytes
Versions: 20
Compression:
Stored size: 435 Bytes
Contents
class Membership < ActiveRecord::Base belongs_to :user belongs_to :account has_many :permissions, :dependent => :destroy has_many :projects, :through => :permissions validates_presence_of :user_id validates_presence_of :account_id validates_uniqueness_of :user_id, :scope => :account_id def name user.name end def email user.email end def self.by_name joins(:user).order('users.name') end end
Version data entries
20 entries across 20 versions & 1 rubygems