Permalink
Browse files

fix bug

  • Loading branch information...
grosser committed Mar 7, 2011
1 parent dfc47c6 commit 190730353557289daed7a282b5acf4a5d2c1ae0e
Showing with 5 additions and 1 deletion.
  1. +4 −0 app/helpers/application_helper.rb
  2. +1 −1 app/views/strikes/show.erb
@@ -10,4 +10,8 @@ def nbsp(x=1)
def d(date)
date.strftime('%d.%m.%Y') if date
end
+
+ def is_owner?(object)
+ current_user.try(:is_owner?, object)
+ end
end
@@ -3,4 +3,4 @@
<br/><br/><br/>
eingetragen von <%= link_to @strike.creator.name, "http://www.facebook.com/#!/profile.php?id=#{@strike.creator.fb_id}&v=wall" %>
<br/><br/>
-<%= link_to 'Löschen', strike_path(@strike), :method => :delete, :confirm => 'Löschen ??' if current_user.is_owner?(@strike) %>
+<%= link_to 'Löschen', strike_path(@strike), :method => :delete, :confirm => 'Löschen ??' if is_owner?(@strike) %>

0 comments on commit 1907303

Please sign in to comment.