only let users favorite their own pages

This commit is contained in:
Andrew Brown 2020-04-06 17:34:08 -05:00
parent 68dfd907ee
commit 5af74830f3

View File

@ -8,7 +8,7 @@
end
%>
<% if content.persisted? %>
<% if content.persisted? && user_signed_in? && content.user == current_user %>
<i class="material-icons right yellow-text favorite-button tooltipped"
data-tooltip="<%= action %> this page"
data-content-id="<%= content.id %>"