add admin user interface

This commit is contained in:
albert
2011-09-13 19:37:24 -04:00
parent c9438970ce
commit 010f210345
6 changed files with 48 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
module Admin
class UsersController < ApplicationController
before_filter :admin_only
def edit
@user = User.find(params[:id])
end
def update
@user = User.find(params[:id])
@user.level = params[:user][:level]
@user.save
redirect_to admin_user_path(@user, :notice => "User updated")
end
end
end