notebook/app/controllers/users_controller.rb
2017-09-30 14:08:49 +02:00

14 lines
357 B
Ruby

class UsersController < ApplicationController
def index
redirect_to new_session_path(User)
end
def show
@user = User.find(params[:id])
Mixpanel::Tracker.new(Rails.application.config.mixpanel_token).track(@user.id, 'viewed profile', {
'sharing any content': @user.public_content_count != 0
}) if Rails.env.production?
end
end