Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AdminUsersController < ApplicationController
- before_filter :require_admin_privs
- def edit
- @user = User.find(params[:id])
- render :action => "profiles/edit"
- end
- def update
- @user = User.find(params[:id])
- @user.update_attributes! params[:user]
- redirect_to("wherever")
- rescue
- render :action => "profiles/edit"
- end
- end
- class ProfilesController < ApplicationController
- def edit
- @user = current_user
- end
- def update
- @user = current_user
- @user.update_attributes! params[:user]
- redirect_to("wherever")
- rescue
- render :action => "edit"
- end
- end
Add Comment
Please, Sign In to add comment