Skip to content

Commit 84ab204

Browse files
committed
skip favorite_control queries
1 parent 9fc6bb6 commit 84ab204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/content/display/_favorite_control.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
end
99
%>
1010

11-
<% if content.persisted? && user_signed_in? && content.user == current_user %>
11+
<% if content.persisted? && user_signed_in? && content.user_id == current_user.try(:id) %>
1212
<i class="material-icons right yellow-text favorite-button tooltipped"
1313
data-tooltip="<%= action %> this page"
1414
data-content-id="<%= content.id %>"

0 commit comments

Comments
 (0)