Class: Avo::CoverPhotoComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Avo::CoverPhotoComponent
- Defined in:
- app/components/avo/cover_photo_component.rb
Constant Summary
Constants included from Avo::Concerns::FindAssociationField
Avo::Concerns::FindAssociationField::ASSOCIATIONS
Instance Method Summary collapse
- #render? ⇒ Boolean
-
#size_class ⇒ Object
aspect-cover-sm aspect-cover-md aspect-cover-lg.
Methods inherited from BaseComponent
Methods included from Avo::Concerns::FindAssociationField
Instance Method Details
#render? ⇒ Boolean
16 17 18 |
# File 'app/components/avo/cover_photo_component.rb', line 16 def render? @cover_photo.present? && @cover_photo.visible_in_current_view? end |
#size_class ⇒ Object
aspect-cover-sm aspect-cover-md aspect-cover-lg
12 13 14 |
# File 'app/components/avo/cover_photo_component.rb', line 12 def size_class "aspect-cover-#{@size}" end |