I am using carrierwave for uploading images(jpg,jpeg) as well as pdf, doc, xls, files in my application.
so when i use
<%= link_to (image_tag media.image_url().to_s) %>
or
<%= image_tag media.image_url().to_s %>
It shows broken image for (pdf, doc,xls) & when i right click on that broken image, It opens save image as box & saves that (doc, pdf, xls) for me.
but all i want is that it should show default image for (pdf,doc,xls) & just clicking on that should open popup of save file.
Using:
- carrierwave (0.5.7)
- Rails (3.0.10)