Sha256: 3e10d053d1b8e7454297f96883c27b37627beadd39b335c28390c5f34398e920
Contents?: true
Size: 858 Bytes
Versions: 15
Compression:
Stored size: 858 Bytes
Contents
# frozen_string_literal: true module Decidim # This cell renders the profile of the given user. class UserProfileCell < Decidim::CardMCell include Decidim::SanitizeHelper def user_data render end def unlinked_user_data render end def user model end def resource_path decidim.profile_path(user.nickname) end delegate :nickname, to: :presented_resource delegate :name, to: :presented_resource delegate :officialized?, to: :presented_resource delegate :badge, to: :presented_resource def description html_truncate(decidim_html_escape(user.about.to_s), length: 100) end def avatar user.avatar_url(:big) end def presented_resource @presented_resource ||= user.class.name.include?("Presenter") ? model : present(user) end end end
Version data entries
15 entries across 15 versions & 1 rubygems