Fixed user deletion via User Admin console

This commit is contained in:
2013-01-26 02:45:47 -05:00
parent f3ef2292ae
commit f80624946c
3 changed files with 3 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
class UsersController < ApplicationController
before_filter :check_for_cancel
before_filter :authenticate_user!
before_filter :is_admin?

View File

@@ -28,7 +28,7 @@
<th><%= user.created_at.to_s(:datetime).downcase %></th>
<th><%= user.updated_at.to_s(:datetime).downcase %></th>
<th><%= button_to "Edit", edit_user_path(user), :class => 'btn', :method => "get" %></th>
<th><%= button_to "Delete", user, :method => :delete, :confirm => "Are you sure?", :class => 'btn btn-danger', :method => "get" %></th>
<th> <%= button_to "Delete", user, :action => "destroy", :confirm => "Are you sure?", :method => :delete, :class =>'btn btn-danger' %> </th>
</tr>
<% end %>