Skip to content
Extraits de code Groupes Projets
Valider 4019e442 rédigé par ilya's avatar ilya
Parcourir les fichiers

Checking for failing to set url in photo

parent b279d658
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -17,7 +17,7 @@ module AlbumsHelper ...@@ -17,7 +17,7 @@ module AlbumsHelper
def album_person(album) def album_person(album)
person = album.person 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) link_to "you", user_path(current_user)
else else
link_to person.real_name, person_path(person) link_to person.real_name, person_path(person)
......
...@@ -44,7 +44,8 @@ class Photo < Post ...@@ -44,7 +44,8 @@ class Photo < Post
name_start = remote_path.rindex '/' name_start = remote_path.rindex '/'
@remote_photo_path = remote_path.slice(0, name_start ) @remote_photo_path = remote_path.slice(0, name_start )
@remote_photo_name = remote_path.slice(name_start, remote_path.length) @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 end
def url name = nil def url name = nil
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter