montera34 / pageonex

PageOneX. Analyzing front pages
http://pageonex.com
GNU Affero General Public License v3.0
54 stars 13 forks source link

Do not display missing imags in threads list #185

Closed numeroteca closed 10 years ago

numeroteca commented 10 years ago

In the threads list at /threads the missing images are being displayed as broken images (chrome) or the alt text (firefox). We should add a filter to avoid this behavior and prevent from showing these missing images.

I tried to add a validation in the view with <% if File.exist?(image.thumbnail_local_path) %> or with image.codeable but they didn't work. I must be missing something. ideas?

rahulbot commented 10 years ago

Tested on dev and production and now I don't see any missing images on the all threads page. This same index.html.rb view is used for by_username, mine, and search_by_category... so it should be fixed in all those places too automatically.