use the name routing idea
parent
951965f502
commit
52515d65ee
|
@ -66,7 +66,7 @@ class Photos < Application
|
||||||
raise NotFound unless @photo
|
raise NotFound unless @photo
|
||||||
if @photo.destroy
|
if @photo.destroy
|
||||||
if @photo.album
|
if @photo.album
|
||||||
redirect url(:album, @photo.album)
|
redirect url(:album, @photo.album.name.gsub(/ /, '_'))
|
||||||
else
|
else
|
||||||
redirect url(:photos)
|
redirect url(:photos)
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue