From 6940e098d347ddc450d8694d2ce0e43a8eb56c06 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 14 May 2011 09:36:18 -0400 Subject: [PATCH] say Edit a Copy on outfits#show if it a guest outfit and user is a guest --- app/helpers/outfits_helper.rb | 2 +- app/views/outfits/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/outfits_helper.rb b/app/helpers/outfits_helper.rb index 9f8a0bfc..dd6ca53c 100644 --- a/app/helpers/outfits_helper.rb +++ b/app/helpers/outfits_helper.rb @@ -13,7 +13,7 @@ module OutfitsHelper outfit = outfit_or_options end query = outfit.to_query - query << "&outfit=#{outfit.id}" if outfit.user == current_user + query << "&outfit=#{outfit.id}" if user_signed_in? && outfit.user == current_user link_to content, wardrobe_path(:anchor => query), options end diff --git a/app/views/outfits/show.html.haml b/app/views/outfits/show.html.haml index 6345a596..214c74d4 100644 --- a/app/views/outfits/show.html.haml +++ b/app/views/outfits/show.html.haml @@ -1,7 +1,7 @@ - title(@outfit.name || "Shared outfit") = link_to_edit_outfit(@outfit, :class => 'button', :id => 'outfit-wardrobe-link') do Edit - - unless @outfit.user == current_user + - unless user_signed_in? && @outfit.user == current_user a copy - if @outfit.user_id #outfit-user