diff --git a/app/models/photo.rb b/app/models/photo.rb index 11afaae6c..d169f8044 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -10,7 +10,7 @@ class Photo < Post xml_attr :remote_photo_name xml_attr :caption - xml_attr :status_message_id + xml_attr :status_message_guid belongs_to :status_message @@ -50,6 +50,14 @@ class Photo < Post photo end + def status_message_guid + self.status_message.guid + end + + def status_message_guid= new_sm_guid + self.status_message= StatusMessage.where(:guid => new_sm_guid).first + end + def url(name = nil) if remote_photo_path name = name.to_s + '_' if name