socialforge/app/models/org_member.rb

9 lines
267 B
Ruby

class OrgMember < ActiveRecord::Base
attr_accessible :organization_id, :role, :user_id
belongs_to :organization
belongs_to :user
has_many :roles ,:through => :org_member_roles,:foreign_key => 'role_id'
has_many :org_member_roles,:dependent => :destroy
end