def update
      unless params[:password].blank?
        if @account.update_attributes(:password => params[:password], :password_confirmation => params[:password_confirmation])
          redirect_to login_path, :notice => t(:password_reset)
        else
          flash[:alert] = t(:password_mismatch)
          render :action => 'edit'
        end
      else
        flash[:alert] = t(:password_cannot_be_blank)
        render :action => 'edit'
      end
    end
def update
      unless params[:password].blank?
        if @account.update_attributes(:password => params[:password], :password_confirmation => params[:password_confirmation])
          redirect_to login_path, :notice => t(:password_reset)
        else
          flash[:alert] = t(:password_mismatch)
          render :action => 'edit'
        end
      else
        flash[:alert] = t(:password_cannot_be_blank)
        render :action => 'edit'
      end
    end
Reset password