I have a class that belongs_to :primary_image, :class_name => ‘Image’. In RailsAdmin this is rendered as a dropdown widget that shows me all images in the database. However, they all are “Image #” where # is their ID. In order for an admin to intelligently select an image, I’d like them to see thumbnails of the images instead. Is there a way to get the information that is added to the dropdown to be image tags with their source being a url from the Image instance?
I have a class that belongs_to :primary_image, :class_name => ‘Image’. In RailsAdmin this is
Share
Use
object_labelto set the column/function you wish to use as a display name for all instances.I’m not sure you should use HTML there, but it would look like: