moves storing of visits to queue

This commit is contained in:
rgarcia
2015-09-08 22:06:31 +02:00
parent 55b2f96062
commit cdc914de0d
2 changed files with 11 additions and 1 deletions

View File

@@ -1,9 +1,13 @@
class Ahoy::Store < Ahoy::Stores::ActiveRecordStore
def track_visit(options)
StatsJob.perform_later(super)
end
# Track user IP
def track_event(name, properties, options)
super do |event|
event.ip = request.ip
end
end
end
end