Permalink
Browse files

Do not log if env is test

  • Loading branch information...
1 parent 0ee76f8 commit ebb5a20faa60dab62cb4b12f68f3660fecfa760d @bob-p bob-p committed Oct 6, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/pathways/tracker.rb
View
@@ -5,6 +5,8 @@ module Tracker
def log_visit
+ return if Rails.env.test?
+
unless client_id = cookies[:pathways_token]
client_id = Digest::MD5.hexdigest("#{request.ip}:#{Time.now}")
cookies[:pathways_token] = {
@@ -26,4 +28,4 @@ def log_visit
:user_id => (current_user) ? current_user.id : nil}.to_json
end
end
-end
+end

0 comments on commit ebb5a20

Please sign in to comment.