class AppliedProject < ActiveRecord::Base
  attr_accessible :project_id, :user_id

   belongs_to :user
   belongs_to :project

  #删除用户申请
  def self.deleteappiled(userid, projectid)
    @applieds = AppliedProject.where("user_id = ? and project_id = ?", userid, projectid)
    @applieds.each do |applied|
      applied.destroy
    end
  end

end
