@@ -7,13 +7,13 @@ module ImageHelper # rubocop:todo Metrics/ModuleLength
77 # rubocop:todo Metrics/CyclomaticComplexity
88 # rubocop:todo Metrics/AbcSize
99 def cover_image_tag ( entity , options = { } ) # rubocop:todo Metrics/MethodLength, Metrics/AbcSize
10- image_classes = "cover-image rounded-top #{ options [ :class ] } "
10+ image_classes = "cover-image #{ options [ :class ] } "
1111 image_style = options [ :style ] . to_s
1212 image_width = options [ :width ] || 2400
1313 image_height = options [ :height ] || 600
1414 image_format = options [ :format ] || 'jpg'
15- image_alt = options [ :alt ] || 'Cover Image'
16- image_title = options [ :title ] || 'Cover Image'
15+ image_alt = options [ :alt ] || entity
16+ image_title = options [ :title ] || entity
1717 image_tag_attributes = {
1818 class : image_classes ,
1919 style : image_style ,
@@ -43,8 +43,8 @@ def card_image_tag(entity, options = {}) # rubocop:todo Metrics/MethodLength, Me
4343 image_width = options [ :width ] || 1200
4444 image_height = options [ :height ] || 800
4545 image_format = options [ :format ] || 'jpg'
46- image_alt = options [ :alt ] || 'Card Image'
47- image_title = options [ :title ] || 'Card Image'
46+ image_alt = options [ :alt ] || entity
47+ image_title = options [ :title ] || entity
4848 image_tag_attributes = {
4949 class : image_classes ,
5050 style : image_style ,
@@ -53,7 +53,7 @@ def card_image_tag(entity, options = {}) # rubocop:todo Metrics/MethodLength, Me
5353 }
5454
5555 # Determine if entity has a card image
56- if entity . respond_to? ( :card_image ) && entity . card_image . attached?
56+ if entity . respond_to? ( :card_image ) && entity . card_image & .attached?
5757 attachment = if entity . respond_to? ( :optimized_card_image )
5858 entity . optimized_card_image
5959 else
0 commit comments