Fix 500 on photo destroy

This commit is contained in:
Raphael Sofaer 2011-08-12 15:58:42 -07:00
parent 3831c13a4a
commit 38a8962945

View file

@ -128,7 +128,7 @@ class PhotosController < ApplicationController
format.html do format.html do
flash[:notice] = I18n.t 'photos.destroy.notice' flash[:notice] = I18n.t 'photos.destroy.notice'
if photo.status_message_guid if photo.status_message_guid
respond_with photo, :location => photo.status_message respond_with photo, :location => post_path(photo.status_message)
else else
respond_with photo, :location => person_photos_path(current_user.person) respond_with photo, :location => person_photos_path(current_user.person)
end end