Implemented using a custom failure class to determine what is the trigger for detection if the user is not authenticated? warden_message does not work. Somebody knows?
class CustomFailure < Devise::FailureApp def redirect_url if warden_options[:scope] == :user new_user_registration_path else new_user_registration_path end end def respond if http_auth? http_auth else store_location! flash[:alert] = i18n_message unless flash[:notice] if warden_message == :unconfirmed redirect_to "/confirm" else redirect_to sign_in_path end end end end
If you want to redirect users to your own URL, you should do this in redirect_url , and not in respond :
redirect_url
respond
def redirect_url if warden_message == :unconfirmed '/confirm' else new_user_registration_path end end
Source: https://habr.com/ru/post/1483591/More articles:UITableView last row didSelect not working properly? - iphoneCreating and running an executable file manually - cHow do I know when to execute a UTF8 or punycode DNS query? - winapiChef - share libraries between culinary specialists - ruby โโ| fooobar.comErlang Homepage - erlanghttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1483592/upload-fails-this-file-is-too-large-to-upload-phpini-settings-made&usg=ALkJrhgPsOXrJ-jjpOfjqwHsYMruGvnMCQCocoa failed to load nib window file while nib localization - objective-cHow to enable HQL / JPQL autocompletion in IntelliJ 12 - intellij-ideaComboBox does not select the correct element when binding to CompositeCollection - wpfComboBox lost SelectedIndex - data-bindingAll Articles