socialforge/app/models/org_member.rb

9 lines
267 B
Ruby
Raw Normal View History

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
end