Skip to content

Commit

Permalink
Fix user_id mention
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Leverenz committed Sep 16, 2019
1 parent 98bd663 commit 9fa9bb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/posts/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<%= post.body %>
</div>

<% if user_signed_in? && current_user.id == post.id %>
<% if user_signed_in? && current_user.id == post.user_id %>
<div class="my-4">
<%= link_to 'Edit', edit_post_path(post), class: "btn btn-default" %>
<%= link_to 'Delete', post, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-default" %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/posts/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<%= @post.body %>
</div>

<% if user_signed_in? && current_user.id == @post.id %>
<% if user_signed_in? && current_user.id == @post.user_id %>
<div class="my-4">
<%= link_to 'Edit', edit_post_path(@post), class: "btn btn-default" %>
<%= link_to 'Delete', @post, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-default" %>
Expand Down

0 comments on commit 9fa9bb0

Please sign in to comment.