lib/ipinfo-rails.rb in ipinfo-rails-1.0.0 vs lib/ipinfo-rails.rb in ipinfo-rails-1.0.1

- old
+ new

@@ -32,9 +32,13 @@ end private def is_bot(request) - user_agent = request.user_agent.downcase - user_agent.include?('bot') || user_agent.include?('spider') + if request.user_agent + user_agent = request.user_agent.downcase + user_agent.include?('bot') || user_agent.include?('spider') + else + false + end end end