2015-11-03 11:19:38 +08:00
|
|
|
class OrgMember < ActiveRecord::Base
|
|
|
|
attr_accessible :organization_id, :role, :user_id
|
|
|
|
belongs_to :organization
|
2015-11-12 20:57:41 +08:00
|
|
|
belongs_to :user
|
2015-11-05 17:57:07 +08:00
|
|
|
has_many :roles ,:through => :org_member_roles,:foreign_key => 'role_id'
|
|
|
|
has_many :org_member_roles,:dependent => :destroy
|
|
|
|
|
2015-11-03 11:19:38 +08:00
|
|
|
end
|