From d71c423c9a566f45a10ec4c9876d48d0d12ea8e5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 17 Jul 2019 19:28:57 +0800 Subject: [PATCH] 1 --- app/controllers/competition_teams_controller.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/competition_teams_controller.rb b/app/controllers/competition_teams_controller.rb index bcb04e25..b23ec5d6 100644 --- a/app/controllers/competition_teams_controller.rb +++ b/app/controllers/competition_teams_controller.rb @@ -114,9 +114,9 @@ class CompetitionTeamsController < ApplicationController new_team.team_members.create!(user_id: user_id, role: 3, competition_id: @competition.id, is_teacher: 1) end # 创建时,记录是否是引流用户 - ip = request.remote_ip - ua = UserAgent.find_by_ip(ip) - ua.update_column(:type, UserAgent::COMPETITION) if ua + # ip = request.remote_ip + # ua = UserAgent.find_by_ip(ip) + # ua.update_column(:type, UserAgent::COMPETITION) if ua end end @@ -230,10 +230,10 @@ class CompetitionTeamsController < ApplicationController end team.team_members.create!(user_id: User.current.id, role: 2, competition_id: @competition.id) - # 创建时,记录是否是引流用户 - ip = request.remote_ip - ua = UserAgent.find_by_ip(ip) - ua.update_column(:type, UserAgent::COMPETITION) if ua + # # 创建时,记录是否是引流用户 + # ip = request.remote_ip + # ua = UserAgent.find_by_ip(ip) + # ua.update_column(:type, UserAgent::COMPETITION) if ua end end