0
をリセットするとき、私は、このコントローラのコードを持っている:Railsは工夫 - アップデートのエラーパスワード
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