For image of users I use Paperclip and for admin I use activeadmin. All is going fine but in activeadmin index page missing.png images are showing large. I want o set their height and width but doesn't find any solution how to set their css only for missing.png images.
Maybe this is buggy, but the idea should work.
if model.image.present?
image_tag model.image.url(:thumb)
else
image_tag model.image.url(:thumb), class: 'missing'
end
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.