diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d48e94a2f..9ec06e963 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -154,7 +154,7 @@ module ApplicationHelper skip_avatar = false, base64_encoded_imgs = false) - (defined?(controller) ? controller : ActionController::Base.new) + (defined?(controller) ? controller : ApplicationController.new) .render_to_string( partial: 'shared/atwho_user_container', locals: { @@ -162,17 +162,7 @@ module ApplicationHelper skip_avatar: skip_avatar, skip_user_status: skip_user_status, team: team, - base64_encoded_imgs: base64_encoded_imgs, - user_avatar_absolute_url: user_avatar_absolute_url( - user, - :icon_small, - base64_encoded_imgs - ), - user_avatar_popover_absolute_url: user_avatar_absolute_url( - user, - :thumb, - base64_encoded_imgs && user.avatar.attached? - ) + base64_encoded_imgs: base64_encoded_imgs }, formats: :html ) diff --git a/app/views/shared/_atwho_user_container.html.erb b/app/views/shared/_atwho_user_container.html.erb index ac4a60d8c..b367971b9 100644 --- a/app/views/shared/_atwho_user_container.html.erb +++ b/app/views/shared/_atwho_user_container.html.erb @@ -21,7 +21,11 @@ data-full-name="<%= user.full_name %>" data-email="<%= user.email %>" data-popover-html="<%= popover_html %>" - data-user-avatar-popover-absolute-url="<%= user_avatar_popover_absolute_url %>" + data-user-avatar-popover-absolute-url="<%= user_avatar_absolute_url( + user, + :thumb, + base64_encoded_imgs + ) %>" > <%= user.full_name %>