Module: ViewComponent::ProfileIconComponent
- Included in:
- UiHelper
- Defined in:
- app/helpers/view_component/profile_icon_component.rb
Defined Under Namespace
Classes: ProfileIconComponent
Instance Method Summary collapse
Instance Method Details
#profile_icon_component(letter:, size: 'md') ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'app/helpers/view_component/profile_icon_component.rb', line 33 def profile_icon_component(letter:, size: 'md') normalized_letter = (letter.presence || 'U').to_s[0] profile_icon = ProfileIconComponent.new( letter: normalized_letter, size: ) render partial: 'view_components/profile_icon_component/profile_icon', locals: { profile_icon: } end |