]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/diary_entries/_diary_entry.html.erb
Add social sharing functionality
[rails.git] / app / views / diary_entries / _diary_entry.html.erb
index d4ee530d7f9d80b7787ccdf52b20fd37b261a2cd..2d8243d1b23bf68af5ca3935c175bc398ffc0c1a 100644 (file)
@@ -23,7 +23,7 @@
         </li>
       <% end %>
 
-      <% if current_user && current_user == diary_entry.user %>
+      <% if can?(:edit, diary_entry) %>
         <li><%= link_to t(".edit_link"), edit_diary_entry_path(diary_entry.user, diary_entry) %></li>
       <% end %>
 
@@ -44,4 +44,5 @@
       <% end %>
     </ul>
   </nav>
+
 </article>