From 1c0d5f6e6b5b6b47a054c77d4fdc006cefad3308 Mon Sep 17 00:00:00 2001 From: ilya Date: Fri, 23 Jul 2010 16:07:15 -0700 Subject: [PATCH] Removing destroy link from albums that are not yours --- app/views/albums/show.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml index 2102044c4..fce96ad90 100644 --- a/app/views/albums/show.html.haml +++ b/app/views/albums/show.html.haml @@ -3,7 +3,8 @@ - for photo in @album_photos = link_to (image_tag photo.image.url(:thumb_medium)), object_path(photo) -%p - = link_to "Destroy", @album, :confirm => 'Are you sure?', :method => :delete +-if mine? @album + %p + = link_to "Destroy", @album, :confirm => 'Are you sure?', :method => :delete | = link_to "View All", albums_path