From 28b01532e4afb46005dc3258442334bcaf9499d2 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 21 Feb 2017 19:14:50 +0000 Subject: [PATCH] Fix mixpanel track on image upload --- app/controllers/content_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index ee3ad38c..fc4c6454 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb @@ -145,7 +145,7 @@ class ContentController < ApplicationController Mixpanel::Tracker.new(Rails.application.config.mixpanel_token).track(current_user.id, 'uploaded image', { 'content_type': content_type, 'image_size_kb': image_size_kb, - 'first five images': current_user.image_uploads <= 5 + 'first five images': current_user.image_uploads.count <= 5 }) end end