From 3b4bc95f54ecbf000787e78130cbf4490676267b Mon Sep 17 00:00:00 2001 From: andrew Date: Sun, 23 Nov 2008 01:43:00 -0600 Subject: [PATCH] photo url for facebook app to missing image --- app/helpers/global_helpers.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/helpers/global_helpers.rb b/app/helpers/global_helpers.rb index 4634a6e..9dc2509 100644 --- a/app/helpers/global_helpers.rb +++ b/app/helpers/global_helpers.rb @@ -9,9 +9,13 @@ module Merb end def photo_url(photo, w = nil, h = nil) - w = photo.width if w.nil? or w.to_i > photo.width - h = photo.height if h.nil? or h.to_i > photo.height - url :thumbnail_photo, photo, :width => w, :height => h + if photo.facebook_id + '/images/image-missing.png' + else + w = photo.width if w.nil? or w.to_i > photo.width + h = photo.height if h.nil? or h.to_i > photo.height + url :thumbnail_photo, photo, :width => w, :height => h + end end def indicator