diff options
Diffstat (limited to 'users/app/controllers/users_controller.rb')
-rw-r--r-- | users/app/controllers/users_controller.rb | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb index 6664bd7..4ce970b 100644 --- a/users/app/controllers/users_controller.rb +++ b/users/app/controllers/users_controller.rb @@ -3,6 +3,7 @@ # class UsersController < UsersBaseController + before_filter :authorize, :only => [:show, :edit, :update, :destroy] before_filter :fetch_user, :only => [:show, :edit, :update, :destroy] before_filter :authorize_admin, :only => [:index] @@ -33,20 +34,9 @@ class UsersController < UsersBaseController def edit end - # - # The API user update is used instead. Maybe someday we will have something for which this makes sense. - # - #def update - # @user.update_attributes(params[:user]) - # respond_with @user - #end - def destroy @user.destroy - respond_to do |format| - format.html { redirect_to(admin? ? users_path : root_path) } - format.json { head :no_content } - end + redirect_to admin? ? users_url : root_url end end |