X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3c01d2e80dc0e5b6942eb7b965c991f5eba5fef2..27ee98cf4cce74b10ba05e08c08b46df2b3dfacb:/app/views/diary_entry/view.html.erb
diff --git a/app/views/diary_entry/view.html.erb b/app/views/diary_entry/view.html.erb
index 67ca96e72..6a2a21abc 100644
--- a/app/views/diary_entry/view.html.erb
+++ b/app/views/diary_entry/view.html.erb
@@ -21,10 +21,10 @@
<%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %>
<%= submit_tag t('diary_entry.view.save_button') %>
<% end %>
- <% if @user and @entry.subscribers and @entry.subscribers.exists?(@user) %>
-
<%= link_to t('javascripts.changesets.show.unsubscribe'), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %>
+ <% if @user and @entry.subscribers.exists?(@user.id) %>
+ <%= link_to t('javascripts.changesets.show.unsubscribe'), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %>
<% elsif @user %>
- <%= link_to t('javascripts.changesets.show.subscribe'), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %>
+ <%= link_to t('javascripts.changesets.show.subscribe'), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %>
<% end %>
<% end %>