<% cache "user-profile-sidebar-additional-#{@user.id}-#{@user.github_repos_updated_at}-#{@user.badge_achievements_count}-#{@user.organization_info_updated_at}", expires_in: 2.days do %> <% if @user.organizations.present? %>

Organizations

<%# it's unlikely that a user will belong to enough organizations to cause a performance issue here %> <%# More info regarding the `.present?/.each` pattern: https://www.speedshop.co/2019/01/10/three-activerecord-mistakes.html %> <% @user.organizations.each do |organization| %> <%= organization.name %> profile image

<%= organization.name %>

<% end %>
<% end %> <%= render partial: "users/github_repositories_area", locals: { repositories: repositories } %> <% if @user.badge_achievements_count.positive? %> <%= render partial: "users/badges_area", locals: { achievements: @user.badge_achievements.order(id: :desc).includes(:badge), count: @user.badge_achievements_count, limit: @badges_limit } %> <% end %> <% end %> <% cache "user-profile-sidebar-profile-details-#{@user.id}-#{@user.profile_updated_at}", expires_in: 10.days do %> <% @profile.ui_attributes_for(area: :left_sidebar).each do |title, value| %>

<%= sanitized_sidebar title.titleize %>

<%= sanitized_sidebar value %>
<% end %> <% end %> <% cache "user-profile-sidebar-stats-#{@user.id}-#{@user.last_article_at&.rfc3339}-#{@user.last_comment_at&.rfc3339}-#{@user.following_tags_count}-#{@user.last_followed_at&.rfc3339}", expires_in: 10.days do %>
<%= inline_svg_tag("post.svg", aria: true, class: "crayons-icon mr-3 color-base-50", title: "Post") %> <%= pluralize @user.articles.published.size, "post" %> published
<%= inline_svg_tag("comment.svg", aria: true, class: "crayons-icon mr-3 color-base-50", title: "Comment") %> <%= pluralize @user.comments.where(deleted: false).size, "comment" %> written
<%= inline_svg_tag("tag.svg", aria: true, class: "crayons-icon mr-3 color-base-50", title: "Tag") %> <%= pluralize @user.decorate.cached_followed_tags.size, "tag" %> followed
<% end %>