|
|
@ -33,7 +33,7 @@ module Mobile
|
|
|
|
if params[:edu]
|
|
|
|
if params[:edu]
|
|
|
|
Rails.logger.info("####11111222##{@env['HTTP_X_REAL_IP']}")
|
|
|
|
Rails.logger.info("####11111222##{@env['HTTP_X_REAL_IP']}")
|
|
|
|
ip = @env['HTTP_X_REAL_IP']
|
|
|
|
ip = @env['HTTP_X_REAL_IP']
|
|
|
|
ua = UserAgent.where(:ip => ip)
|
|
|
|
ua = UserAgent.find_by_ip(ip)
|
|
|
|
if ua.blank?
|
|
|
|
if ua.blank?
|
|
|
|
UserAgent.create!(:key => params[:edu].strip, :ip => ip, :type => UserAgent::AD)
|
|
|
|
UserAgent.create!(:key => params[:edu].strip, :ip => ip, :type => UserAgent::AD)
|
|
|
|
end
|
|
|
|
end
|
|
|
|