Only show button on own user page

This commit is contained in:
benji 2015-03-02 16:11:44 +01:00
parent b8b89aa779
commit 7d367a154d

View file

@ -3,7 +3,7 @@
<div class="user_info">
<h5><%= link_to "[Edit profile]" , edit_user_registration_path if current_user == @user%></h5>
<h2><%= @user.nickname %> (<%= @user.full_name %>)</h2>
<%= button_to "PLACE ORDER!", new_user_order_path(@user), method: :get %>
<%= button_to "PLACE ORDER!", new_user_order_path(@user), method: :get if current_user == @user %>
<div class="balance">BALANCE: <%= euro(@user.balance) %></div>
</div>