module BeetleReporter module ApplicationHelper include Pagy::Frontend def current_user main_app.scope.request.env['warden']&.user end def avatar(user) return user.avatar unless user.avatar.blank? Avatarro.image(user.nickname.first) if user.respond_to?(:nickname) end end end