lib/field_test/helpers.rb in field_test-0.5.1 vs lib/field_test/helpers.rb in field_test-0.5.2
- old
+ new
@@ -11,10 +11,10 @@
if !options[:variant] && params[:field_test] && params[:field_test][experiment] && exp.variants.include?(params[:field_test][experiment])
params_variant = params[:field_test][experiment]
end
if FieldTest.exclude_bots?
- options[:exclude] = Browser.new(request.user_agent).bot?
+ 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