Active Storage Image Broken
Hello Group,
I am looking to attach a couple different images to a Programs model. It will have a program image and an instructor pic.
Right now , I just added a single image to the model
I am looking to attach a couple different images to a Programs model. It will have a program image and an instructor pic.
Right now , I just added a single image to the model
has_one_attached :image, dependent => :destroy
I also allowed the :image param in the param list on the controller
I added
form.file_field :image
I have this in the show page<% if program.image.attached? %> <%= image_tag program.image.variant(resize: "500x500") %> <% end %>
This shows broken image but the inspection looks right
What is the best way to have to images attached to the model.
I originally added two fields:string for this
pic:string
instructor_pic:string
TIA
< img src="http://localhost:3000/rails/active_storage/representations/redirect...aW9...../image.png">
Anyone come across this? I am sure its an easy fix.What is the best way to have to images attached to the model.
I originally added two fields:string for this
pic:string
instructor_pic:string
TIA
Notifications
You’re not receiving notifications from this thread.