You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/models/shixun_member.rb

8 lines
258 B

6 years ago
class ShixunMember < ActiveRecord::Base
# role 实训角色: 1 创建者 2 合作者
attr_accessible :shixun_id, :user_id, :role
belongs_to :shixun
belongs_to :user
has_many :roles ,:through => :shixun_member_roles, :foreign_key => 'role_id'
end