2015-05-28 14:44:04 +08:00
|
|
|
class InviteList < ActiveRecord::Base
|
2015-09-15 17:39:57 +08:00
|
|
|
attr_accessible :project_id, :user_id, :mail
|
2015-06-03 18:11:52 +08:00
|
|
|
belongs_to :user
|
|
|
|
belongs_to :project
|
|
|
|
|
|
|
|
# 用户拒绝邀请后,删除记录
|
|
|
|
def self.delete_inviter(userid, projectid)
|
|
|
|
@inviters = AppliedProject.where("user_id = ? and project_id = ?", userid, projectid)
|
|
|
|
@inviters.each do |inviter|
|
|
|
|
inviter.destroy
|
|
|
|
end
|
|
|
|
end
|
2015-05-28 14:44:04 +08:00
|
|
|
end
|