비밀 번호의 라우팅 업데이트가 어떻게 작동하는지 잘 모르겠습니다. 여러 가지 해결책을 찾아 보았지만 여전히 운이 없습니다.암호 경로에 대한 수정 경로 edit_user_registration_path는 암호 동작으로 나를 루트로 리디렉션합니다. 어떻게 변경합니까? - Rails 4
내가 뭘하려고입니다 : 사용자가 자신의 암호를 업데이트 할 때 그들이
dashboard_user_path
아닌root_path
로 리디렉션됩니다
- -하지만 내가 사용자가 무엇을 중요 제가
dashboard_user_path
root_path
전망
<%= link_to "change password", edit_user_registration_path(current_user) %>
application_controller.rb 파일
내 모든 유증 방법 파일 after_resetting_password_path_for(resources)
을 제외하고 작동, 나는 또한 after_update_path_for(resources)
하지만 여전히 행운을 시도했습니다
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
before_filter :configure_permitted_parameters, if: :devise_controller?
protected
def after_resetting_password_path_for(resources)
dashboard_user_path(current_user)
end
def after_sign_up_path_for(resources)
dashboard_user_path(current_user)
end
def after_sign_in_path_for(resources)
dashboard_user_path(current_user)
end
def after_sign_out_path_for(resources)
feedback_path
end
def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:email) }
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:firstname, :lastname, :email, :password) }
end
end
친절하게도 내가 뭘 잘못하고 있는지 조언 해 줄 수 있겠 어. 많은 감사