Skip to content

Commit

Permalink
Show edit for orders only if current user was the order taker
Browse files Browse the repository at this point in the history
  • Loading branch information
scrabill committed Dec 22, 2019
1 parent 2967a15 commit 8185e28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/orders/show.html.erb
Original file line number Diff line number Diff line change
@@ -7,4 +7,6 @@ Status: <%= @order.status %>

<%= link_to "Back To All Orders", orders_path %>
<%= link_to "Create a New Order", new_user_order_path(current_user) %>
<%= link_to "Edit", edit_order_path %>
<% if current_user.id == @order.user_id %>
<%= link_to "Edit", edit_order_path %>
<% end %>

0 comments on commit 8185e28

Please sign in to comment.