0
암호를 재설정 할 때 :레일 고안 - 업데이트에 대한 오류 나는이 컨트롤러 코드가
def update
super
respond_to do |format|
format.html{redirect_to session[:redirect_to]}
end
end
내 클래스는 다음과 같이 유증 암호에서 상속 :
class Mobile::PasswordsController < Devise::PasswordsController
나는이 오류가 :
를AbstractController::DoubleRenderError in Mobile::PasswordsController#update
Render and/or redirect were called multiple times in this action.
Please note that you may only call render OR redirect, and at most once per action.
Also note that neither redirect nor render terminate execution of the action, so
if you want to exit an action after redirecting, you need to do something like
"redirect_to(...) and return".
무엇을해야할까요? 리디렉션을 알고 있지만 올바른 방법을 모릅니다.
감사합니다.
당신을 감사합니다. NoMethodError (정의되지 않은 메서드 인 nil : NilClass에 대해 정의 된 메서드 'active_agency_id') : app/controllers/welcome_controller.rb : 7 : 'show'에서 코드를 시도한 후에 이러한 오류가 발생했기 때문에 효과가 있었는지 알기 어렵습니다. – Awesomeness
그런 종류의 오류를 수정하는 방법에 대한 의견이 있으십니까? 감사! – Awesomeness
@ArcaneRaine 다음과 같이 보입니다 : unless current_user.active_agency_id.blank? && current_user.active_advertiser_id.blank? – Awesomeness