ruby on rails - Devise overrides my request params when user is logged in -


i using request params in application transfer information other websites. request looks like:

myapp.com/users/sign_up?customer=somevalue 

once user isn’t logged in, works fine , able retrieve these params in registrations controller (i have overridden devise's controller). them using:

customer_key = params[:customer] 

once user logged in, cant retrieve these params , suspect devise has modified them me. "post-login" params are:

{"action"=>"show", "controller"=>"users", "id"=>"my-user"} 

(this taken users controller)

my question - how can retrieve these params when user logged in in users controller?

you have create require_no_authentication method in overridden registrations controller.

devise::registration controller have before filter prepend_before_filter :require_no_authentication, :only => [ :new, :create, :cancel ]

that checks if user logged in or not , if redirects after_sign_in_path

as noted here

https://github.com/plataformatec/devise/blob/master/app/controllers/devise_controller.rb#l96

good luck!


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -