lib/analytical.rb in analytical-0.6.0 vs lib/analytical.rb in analytical-0.7.0

- old
+ new

@@ -5,10 +5,11 @@ module Analytical # any method placed here will apply to ActionController::Base def analytical(options={}) send :include, InstanceMethods + send :include, Analytical::BotDetector send :helper_method, :analytical send :cattr_accessor, :analytical_options self.analytical_options = options.reverse_merge({ :modules=>[], @@ -35,9 +36,12 @@ options = self.class.analytical_options.merge({ :ssl => request.ssl? }) if options[:disable_if].call(self) options[:modules] = options[:development_modules] + end + if analytical_is_robot?(request.user_agent) + options[:modules] = [] end Analytical::Api.new options end end end \ No newline at end of file