Display an ActiveStorage Image in Rails_Admin

395 Views Asked by At

I am working on Rails:6.0.3.2 with ActiveStorage and RailsAdmin

I am trying to display my uploaded image on the rails admin side, but only get the no image icon, when I click the icon it takes me to the image, so the image is there. Where have I gone wrong?

My code is as follows:

title.rb

class Title < ApplicationRecord
  has_one_attached :book_image
end

rails_admin.rb

config.model "Title" do
  list do
    configure :book_image, :active_storage
  end

  edit do
    field :book_image, :active_storage
  end
end
0

There are 0 best solutions below