Class: Avo::CoverPhotoComponent

Inherits:
BaseComponent
  • Object
show all
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

Methods inherited from BaseComponent

#has_with_trial

Methods included from Avo::Concerns::FindAssociationField

#find_association_field

Instance Method Details

#render?Boolean

Returns:

  • (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_classObject

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