1class Admin::ProfileController < Admin::AdminController
 
2  skip_before_filter :check_for_password_change
 
3
 
4  def edit
 
5  end
 
6
 
7  def update
 
8    if current_user.update_with_password(admin_user_params)
 
 9      redirect_to admin_root_url, notice: :password_updated
 
10    else
 
11      render :edit
 
12    end
 
13  end
 
 
15  def admin_user_params
 
16    params.require(:admin_user).permit(
 
17      :current_password, :password, :password_confirmation
 
18    )
 
19  end
 
20end