Permalink
Browse files

adding test to hide the clone button

if user already as this link no need to clone
  • Loading branch information...
1 parent c9dbaaf commit e7dabacd540f497aaedb2c1db7092bba47d93082 mcansky committed Feb 7, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/views/posts/_short_post.haml
@@ -9,7 +9,7 @@
- if (current_user && (post.user == current_user))
= link_to 'e', {:controller => "posts", :action => "edit", :id => post.id}, {:class => "edit", :title => "edit"}
= link_to 'd!', post, {:confirm => "Deleting, You sure ?", :method => :delete, :title => "destroy"}
- - elsif (current_user && post.user != current_user)
+ - elsif (current_user && post.user != current_user && !current_user.links.include?(post.link))
= link_to 'c', {:controller => "posts", :action => "create", :id => post.id}, {:method => :post}
- if post.private?
%span.private P

0 comments on commit e7dabac

Please sign in to comment.