photo url for facebook app to missing image
parent
dec7581cec
commit
3b4bc95f54
|
@ -9,9 +9,13 @@ module Merb
|
||||||
end
|
end
|
||||||
|
|
||||||
def photo_url(photo, w = nil, h = nil)
|
def photo_url(photo, w = nil, h = nil)
|
||||||
w = photo.width if w.nil? or w.to_i > photo.width
|
if photo.facebook_id
|
||||||
h = photo.height if h.nil? or h.to_i > photo.height
|
'/images/image-missing.png'
|
||||||
url :thumbnail_photo, photo, :width => w, :height => h
|
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
|
end
|
||||||
|
|
||||||
def indicator
|
def indicator
|
||||||
|
|
Reference in New Issue