lib/field_test/helpers.rb in field_test-0.3.1 vs lib/field_test/helpers.rb in field_test-0.3.2
- old
+ new
@@ -14,9 +14,11 @@
if FieldTest.exclude_bots?
options[:exclude] = Browser.new(request.user_agent).bot?
end
+ options[:exclude] ||= FieldTest.excluded_ips.any? { |ip| ip.include?(request.remote_ip) }
+
options[:ip] = request.remote_ip
options[:user_agent] = request.user_agent
end
# cache results for request