diff --git a/app/helpers/albums_helper.rb b/app/helpers/albums_helper.rb index 19df7bd01..338f26ec9 100644 --- a/app/helpers/albums_helper.rb +++ b/app/helpers/albums_helper.rb @@ -17,7 +17,7 @@ module AlbumsHelper def album_person(album) person = album.person - if album.person_id == current_user.id + if album.person_id == current_user.person.id link_to "you", user_path(current_user) else link_to person.real_name, person_path(person) diff --git a/app/models/photo.rb b/app/models/photo.rb index b43ddc376..c11aae84a 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -44,7 +44,8 @@ class Photo < Post name_start = remote_path.rindex '/' @remote_photo_path = remote_path.slice(0, name_start ) @remote_photo_name = remote_path.slice(name_start, remote_path.length) - puts url + save + raise "Failed to set path for : #{self.inspect}" if Photo.first(:id => self.id).url.nil? end def url name = nil