Flash Message Lost in Devise redirect to Wicked Wizard

106 Views Asked by At

This is likely a debugging problem more than anything else, but I'm losing a flash message between Devise's after_sign_up_path_for and the beginning of a Wicked wizard. I've tried multiple placements of flash.keep to no avail.

Is there any way to print the exact redirections that are happening so I can figure out where the message is being lost?

Here's the redirect code in my registrations controller:

def after_sign_up_path_for(user)
  logger.debug "entering redirect, flashing"
  flash[:analytics] = "signed_up"
  after_signup_index_path
end 

Devise's create method contains a redirect_to call and I'm calling super above so I can't use redirect_to after_signup_index_path in the above block - might this solve the problem?

Here's the (condensed) Wicked wizard action:

def show
  flash.keep
  @user = current_user
  render_wizard
end
0

There are 0 best solutions below