From 52515d65ee50ff2420793f3abf64591d197fc43f Mon Sep 17 00:00:00 2001 From: Andrew Coleman Date: Sat, 21 Mar 2009 22:00:17 -0500 Subject: [PATCH] use the name routing idea --- app/controllers/photos.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/photos.rb b/app/controllers/photos.rb index fec02bd..04d1134 100644 --- a/app/controllers/photos.rb +++ b/app/controllers/photos.rb @@ -66,7 +66,7 @@ class Photos < Application raise NotFound unless @photo if @photo.destroy if @photo.album - redirect url(:album, @photo.album) + redirect url(:album, @photo.album.name.gsub(/ /, '_')) else redirect url(:photos) end