I'm trying to redirect users that have failed the sign up form (e.g. they entered a username that is already taken, they left a field blank, etc...)

I have custom failure set up for users that fail the sign in form, code below:

class CustomFailure < Devise::FailureApp 

   def redirect_url 
      root_path 
   end 

   def respond 
      if http_auth? 
      http_auth 
   else 
      redirect 
   end 
 end

However, I've been stuck on how to set this up for sign up failure. Ideally I would just like to redirect them back/to root_path, any ideas? Thank you!

Edit
Report