socialforge/app/models/invite_list.rb

14 lines
375 B
Ruby
Raw Permalink Normal View History

2015-05-28 14:44:04 +08:00
class InviteList < ActiveRecord::Base
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