From a222edc646c5c047a99303ae7d3c5788d098bb06 Mon Sep 17 00:00:00 2001 From: ilya Date: Wed, 21 Jul 2010 20:22:30 -0700 Subject: [PATCH] Url not path --- app/models/photo.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/photo.rb b/app/models/photo.rb index 08af97af1..8964e0089 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -7,13 +7,16 @@ class Photo < Post xml_reader :album_id key :album_id, ObjectId + + belongs_to :album, :class_name => 'Album' timestamps! validates_presence_of :album + def remote_photo - image.path + User.first.url.chop + image.path end def remote_photo= remote_path