Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
chances current_user to an instance variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob committed May 30, 2017
1 parent aeb7c1c commit 8d19a53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/users/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<%= f.input :email, label: false, class: 'form-control' %>
</div>
</div>
<% if current_user.is_admin %>
<% if @current_user.is_admin %>
<div class="form-group form-group-lg">
<label class="col-sm-1">Admin</label>
<div class="col-sm-11">
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="col-md-3">
</div>
<div class="col-md-3">
<% if current_user.is_admin %>
<% if @current_user.is_admin %>
<%= link_to 'Delete? It’s Permanent.', @user, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-default btn-lg btn-block" %>
<% end %>
</div>
Expand Down

0 comments on commit 8d19a53

Please sign in to comment.