Sha256: 8e2fc31fc275f4d3927da2515fca35419c208a166a60acc009a50dbff8dfce67
Contents?: true
Size: 411 Bytes
Versions: 66
Compression:
Stored size: 411 Bytes
Contents
class Membership < ActiveRecord::Base belongs_to :user belongs_to :account has_many :permissions 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
66 entries across 66 versions & 1 rubygems