0

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
Nick
  • 839
  • 1
  • 10
  • 19
  • Can you give use some logs? – max May 20 '17 at 12:42
  • Also instead of overriding `after_sign_up_path_for` you can pass a block to super. `super { flash[:analytics] = "signed_up" }`. Almost all the Devise controllers/actions yield so you can use this to shoehorn your own code into the flow. – max May 20 '17 at 12:58

0 Answers0