change code to take new filenames

This commit is contained in:
2022-12-17 15:00:47 +02:00
parent f7147f79e2
commit fc2c390fd1
7 changed files with 15 additions and 18 deletions

View File

@ -31,7 +31,7 @@
-if( card.image.blank? )
%p No image
-else
= image_tag( card.image.assert_name , class: "p-3")
= image_for( card, "p-3")
.basis-72.grow
%h3.mt-4.text-lg.font-bold Fields
= form_tag( card_url(card.id) , {method: :patch , class: "mx-auto mt-8 mb-0 max-w space-y-4" } ) do

View File

@ -15,7 +15,7 @@
%strong.inline-block.rounded.bg-yellow-200.px-3.py-1.text-md.font-medium
= aspect_ratio(image)
.w-full.object-contain.h-72
=image_tag(image.assert_name)
=image_tag(image.asset_name)
.flex.justify-between.mb-8
%strong.inline-block.rounded.bg-orange-50.px-3.py-1.text-md.font-medium
= "#{image.size}k"

View File

@ -44,7 +44,7 @@
= link_to(section_select_image_url(section.id)) do
%h3.mt-4.text-lg.font-bold Image
-if section.image
= image_tag( section.image.assert_name , class: "h-40")
= image_for( section , "h-40")
-else
%p No image
.basis-52.grow

View File

@ -18,7 +18,7 @@
-if( @section.image.blank? )
%p No image
-else
= image_tag( @section.image.assert_name , class: "my-3")
= image_for( @section , "my-3")
= yellow_button("Change Image", section_select_image_url(@section.id))
= red_button( "Remove image", section_set_image_path( @section.id , image: ""))